diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | 0001-fix-latest.patch | 47 | ||||
-rw-r--r-- | PKGBUILD | 14 |
3 files changed, 61 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = xradio-git pkgdesc = Driver for the Allwinner XRadio XR819 wifi chip pkgver = r183.354e8c3 - pkgrel = 3 + pkgrel = 4 url = https://github.com/karabek/xradio install = xradio.install arch = armv7h @@ -9,6 +9,8 @@ pkgbase = xradio-git makedepends = git makedepends = linux-headers source = git+https://github.com/dbeinder/xradio.git#branch=karabek_rebase + source = 0001-fix-latest.patch sha256sums = SKIP + sha256sums = cb92aaef5f924bc896878ae8df20a65d485a59bf3a2cc3d63b9c83acd66c0ae9 pkgname = xradio-git diff --git a/0001-fix-latest.patch b/0001-fix-latest.patch new file mode 100644 index 000000000000..0d68f037c0bd --- /dev/null +++ b/0001-fix-latest.patch @@ -0,0 +1,47 @@ +diff --git a/ap.c b/ap.c +index 6c48d26..6e22d3a 100644 +--- a/ap.c ++++ b/ap.c +@@ -476,9 +476,9 @@ void xradio_bss_info_changed(struct ieee80211_hw *dev, + /* TODO:COMBO:Change this once + * mac80211 changes are available */ + BUG_ON(!hw_priv->channel); +- hw_priv->ht_oper.ht_cap = sta->ht_cap; ++ hw_priv->ht_oper.ht_cap = sta->deflink.ht_cap; + priv->bss_params.operationalRateSet =__cpu_to_le32( +- xradio_rate_mask_to_wsm(hw_priv, sta->supp_rates[hw_priv->channel->band])); ++ xradio_rate_mask_to_wsm(hw_priv, sta->deflink.supp_rates[hw_priv->channel->band])); + /* TODO by Icenowy: I think this may lead to some problems. */ + // hw_priv->ht_oper.channel_type = info->channel_type; + hw_priv->ht_oper.operation_mode = info->ht_operation_mode; +diff --git a/main.c b/main.c +index 2b76ede..779fa2c 100644 +--- a/main.c ++++ b/main.c +@@ -502,8 +502,8 @@ int xradio_core_init(struct sdio_func* func) + u8 b; /* MRK 5.5a */ + struct ieee80211_hw *dev; + struct xradio_common *hw_priv; +- unsigned char randomaddr[ETH_ALEN]; +- const unsigned char *addr = NULL; ++ unsigned char addr[ETH_ALEN]; ++ bool addr_init = false; + + //init xradio_common + dev = xradio_init_common(sizeof(struct xradio_common)); +@@ -518,12 +518,11 @@ int xradio_core_init(struct sdio_func* func) + + // fill in mac addresses + if (hw_priv->pdev->of_node) { +- addr = of_get_mac_address(hw_priv->pdev->of_node); ++ addr_init = (of_get_mac_address(hw_priv->pdev->of_node, addr) == 0); + } +- if (!addr) { ++ if (!addr_init) { + dev_warn(hw_priv->pdev, "no mac address provided, using random\n"); +- eth_random_addr(randomaddr); +- addr = randomaddr; ++ eth_random_addr(addr); + } + for (b = 0; b < XRWL_MAX_VIFS; b++) { /* MRK 5.5a */ + memcpy(hw_priv->addresses[b].addr, addr, ETH_ALEN); @@ -4,15 +4,17 @@ _KVER=$(uname -r) pkgname=xradio-git _pkgname=xradio pkgver=r183.354e8c3 -pkgrel=3 +pkgrel=4 pkgdesc="Driver for the Allwinner XRadio XR819 wifi chip" arch=('armv7h') url="https://github.com/karabek/xradio" license=('GPL') install=xradio.install makedepends=('git' 'linux-headers') -source=("git+https://github.com/dbeinder/xradio.git#branch=karabek_rebase") -sha256sums=('SKIP') +source=("git+https://github.com/dbeinder/xradio.git#branch=karabek_rebase" + "0001-fix-latest.patch") +sha256sums=('SKIP' + 'cb92aaef5f924bc896878ae8df20a65d485a59bf3a2cc3d63b9c83acd66c0ae9') pkgver() { cd "$srcdir/${_pkgname}" @@ -20,6 +22,12 @@ pkgver() { printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } +prepare() { + cd "$srcdir/${_pkgname}" + + patch -Np1 -i "$srcdir/0001-fix-latest.patch" +} + build() { cd "${_pkgname}" |