Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48247master
parent
56f6d35716
commit
82c5e2c497
@ -1,28 +0,0 @@ |
||||
From 7a6e8b70a956a722f90d551e920c1096a9455b54 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Sat, 5 Dec 2015 14:10:28 +0100
|
||||
Subject: [PATCH 07/12] header: fix genl_notify() on kernel 4.4
|
||||
|
||||
The change of the parameters of genl_notify() is in kernel 4.4. This
|
||||
backport should not be applied for kernel 4.4 and newer kernel versions.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
backport/backport-include/net/genetlink.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/backport-include/net/genetlink.h
|
||||
+++ b/backport-include/net/genetlink.h
|
||||
@@ -146,10 +146,12 @@ backport_genlmsg_multicast_allns(struct
|
||||
#define __genl_const
|
||||
#else /* < 3.13 */
|
||||
#define __genl_const const
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0)
|
||||
#define genl_notify(_fam, _skb, _info, _group, _flags) \
|
||||
genl_notify(_fam, _skb, genl_info_net(_info), \
|
||||
genl_info_snd_portid(_info), \
|
||||
_group, _info->nlhdr, _flags)
|
||||
+#endif /* < 4.4 */
|
||||
#endif /* < 3.13 */
|
||||
|
||||
#endif /* __BACKPORT_NET_GENETLINK_H */
|
@ -1,24 +0,0 @@ |
||||
From: Bob Copeland <me@bobcopeland.com>
|
||||
Date: Thu, 19 Nov 2015 10:04:48 -0500
|
||||
Subject: [PATCH] ath5k: fix RTS/CTS by using proper rate flags
|
||||
|
||||
The rates in the tx control rateset do not have the protection
|
||||
flags applied, so RTS/CTS would never get enabled if requested.
|
||||
|
||||
Fix by using the rate flags in the rates returned by
|
||||
ieee80211_get_tx_rates().
|
||||
|
||||
Signed-off-by: Bob Copeland <me@bobcopeland.com>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath5k/base.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
||||
@@ -767,7 +767,7 @@ ath5k_txbuf_setup(struct ath5k_hw *ah, s
|
||||
if (info->flags & IEEE80211_TX_CTL_NO_ACK)
|
||||
flags |= AR5K_TXDESC_NOACK;
|
||||
|
||||
- rc_flags = info->control.rates[0].flags;
|
||||
+ rc_flags = bf->rates[0].flags;
|
||||
|
||||
hw_rate = ath5k_get_rate_hw_value(ah->hw, info, bf, 0);
|
||||
|
@ -1,104 +0,0 @@ |
||||
From: Felix Fietkau <nbd@openwrt.org>
|
||||
Date: Sun, 22 Nov 2015 14:03:40 +0100
|
||||
Subject: [PATCH] ath10k: do not use coherent memory for allocated device
|
||||
memory chunks
|
||||
|
||||
Coherent memory is more expensive to allocate (and constrained on some
|
||||
architectures where it has to be pre-allocated). It is also completely
|
||||
unnecessary, since the host has no reason to even access these allocated
|
||||
memory spaces
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
@@ -4312,34 +4312,58 @@ void ath10k_wmi_event_vdev_resume_req(st
|
||||
ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_RESUME_REQ_EVENTID\n");
|
||||
}
|
||||
|
||||
-static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
|
||||
- u32 num_units, u32 unit_len)
|
||||
+static int ath10k_wmi_alloc_chunk(struct ath10k *ar, u32 req_id,
|
||||
+ u32 num_units, u32 unit_len)
|
||||
{
|
||||
dma_addr_t paddr;
|
||||
- u32 pool_size;
|
||||
+ u32 pool_size = 0;
|
||||
int idx = ar->wmi.num_mem_chunks;
|
||||
+ void *vaddr = NULL;
|
||||
|
||||
- pool_size = num_units * round_up(unit_len, 4);
|
||||
+ if (ar->wmi.num_mem_chunks == ARRAY_SIZE(ar->wmi.mem_chunks))
|
||||
+ return -ENOMEM;
|
||||
|
||||
- if (!pool_size)
|
||||
- return -EINVAL;
|
||||
+ while (!vaddr && num_units) {
|
||||
+ pool_size = num_units * round_up(unit_len, 4);
|
||||
+ if (!pool_size)
|
||||
+ return -EINVAL;
|
||||
|
||||
- ar->wmi.mem_chunks[idx].vaddr = dma_alloc_coherent(ar->dev,
|
||||
- pool_size,
|
||||
- &paddr,
|
||||
- GFP_KERNEL);
|
||||
- if (!ar->wmi.mem_chunks[idx].vaddr) {
|
||||
- ath10k_warn(ar, "failed to allocate memory chunk\n");
|
||||
- return -ENOMEM;
|
||||
+ vaddr = kzalloc(pool_size, GFP_KERNEL | __GFP_NOWARN);
|
||||
+ if (!vaddr)
|
||||
+ num_units /= 2;
|
||||
}
|
||||
|
||||
- memset(ar->wmi.mem_chunks[idx].vaddr, 0, pool_size);
|
||||
+ if (!num_units)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ paddr = dma_map_single(ar->dev, vaddr, pool_size, DMA_TO_DEVICE);
|
||||
+ if (dma_mapping_error(ar->dev, paddr)) {
|
||||
+ kfree(vaddr);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
|
||||
+ ar->wmi.mem_chunks[idx].vaddr = vaddr;
|
||||
ar->wmi.mem_chunks[idx].paddr = paddr;
|
||||
ar->wmi.mem_chunks[idx].len = pool_size;
|
||||
ar->wmi.mem_chunks[idx].req_id = req_id;
|
||||
ar->wmi.num_mem_chunks++;
|
||||
|
||||
+ return num_units;
|
||||
+}
|
||||
+
|
||||
+static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
|
||||
+ u32 num_units, u32 unit_len)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ while (num_units) {
|
||||
+ ret = ath10k_wmi_alloc_chunk(ar, req_id, num_units, unit_len);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ num_units -= ret;
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -7717,10 +7741,11 @@ void ath10k_wmi_free_host_mem(struct ath
|
||||
|
||||
/* free the host memory chunks requested by firmware */
|
||||
for (i = 0; i < ar->wmi.num_mem_chunks; i++) {
|
||||
- dma_free_coherent(ar->dev,
|
||||
- ar->wmi.mem_chunks[i].len,
|
||||
- ar->wmi.mem_chunks[i].vaddr,
|
||||
- ar->wmi.mem_chunks[i].paddr);
|
||||
+ dma_unmap_single(ar->dev,
|
||||
+ ar->wmi.mem_chunks[i].paddr,
|
||||
+ ar->wmi.mem_chunks[i].len,
|
||||
+ DMA_TO_DEVICE);
|
||||
+ kfree(ar->wmi.mem_chunks[i].vaddr);
|
||||
}
|
||||
|
||||
ar->wmi.num_mem_chunks = 0;
|
@ -0,0 +1,156 @@ |
||||
From: Eli Cooper <elicooper@gmx.com>
|
||||
Date: Thu, 14 Jan 2016 00:07:12 +0800
|
||||
Subject: [PATCH] rt2x00: fix monitor mode regression
|
||||
|
||||
Since commit df1404650ccbfeb76a84f301f22316be0d00a864 monitor mode for rt2x00
|
||||
has been made effectively useless because the hardware filter is configured to
|
||||
drop packets whose intended recipient is not the device, regardless of the
|
||||
presence of monitor mode interfaces.
|
||||
|
||||
This patch fixes this regression by adding explicit monitor mode support, and
|
||||
configuring the hardware filter accordingly.
|
||||
|
||||
Signed-off-by: Eli Cooper <elicooper@gmx.com>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
|
||||
@@ -273,8 +273,10 @@ static void rt2400pci_config_filter(stru
|
||||
!(filter_flags & FIF_PLCPFAIL));
|
||||
rt2x00_set_field32(®, RXCSR0_DROP_CONTROL,
|
||||
!(filter_flags & FIF_CONTROL));
|
||||
- rt2x00_set_field32(®, RXCSR0_DROP_NOT_TO_ME, 1);
|
||||
+ rt2x00_set_field32(®, RXCSR0_DROP_NOT_TO_ME,
|
||||
+ !rt2x00dev->is_monitoring);
|
||||
rt2x00_set_field32(®, RXCSR0_DROP_TODS,
|
||||
+ !rt2x00dev->is_monitoring &&
|
||||
!rt2x00dev->intf_ap_count);
|
||||
rt2x00_set_field32(®, RXCSR0_DROP_VERSION_ERROR, 1);
|
||||
rt2x00mmio_register_write(rt2x00dev, RXCSR0, reg);
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
|
||||
@@ -274,8 +274,10 @@ static void rt2500pci_config_filter(stru
|
||||
!(filter_flags & FIF_PLCPFAIL));
|
||||
rt2x00_set_field32(®, RXCSR0_DROP_CONTROL,
|
||||
!(filter_flags & FIF_CONTROL));
|
||||
- rt2x00_set_field32(®, RXCSR0_DROP_NOT_TO_ME, 1);
|
||||
+ rt2x00_set_field32(®, RXCSR0_DROP_NOT_TO_ME,
|
||||
+ !rt2x00dev->is_monitoring);
|
||||
rt2x00_set_field32(®, RXCSR0_DROP_TODS,
|
||||
+ !rt2x00dev->is_monitoring &&
|
||||
!rt2x00dev->intf_ap_count);
|
||||
rt2x00_set_field32(®, RXCSR0_DROP_VERSION_ERROR, 1);
|
||||
rt2x00_set_field32(®, RXCSR0_DROP_MCAST,
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
|
||||
@@ -437,8 +437,10 @@ static void rt2500usb_config_filter(stru
|
||||
!(filter_flags & FIF_PLCPFAIL));
|
||||
rt2x00_set_field16(®, TXRX_CSR2_DROP_CONTROL,
|
||||
!(filter_flags & FIF_CONTROL));
|
||||
- rt2x00_set_field16(®, TXRX_CSR2_DROP_NOT_TO_ME, 1);
|
||||
+ rt2x00_set_field16(®, TXRX_CSR2_DROP_NOT_TO_ME,
|
||||
+ !rt2x00dev->is_monitoring);
|
||||
rt2x00_set_field16(®, TXRX_CSR2_DROP_TODS,
|
||||
+ !rt2x00dev->is_monitoring &&
|
||||
!rt2x00dev->intf_ap_count);
|
||||
rt2x00_set_field16(®, TXRX_CSR2_DROP_VERSION_ERROR, 1);
|
||||
rt2x00_set_field16(®, TXRX_CSR2_DROP_MULTICAST,
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -1490,7 +1490,8 @@ void rt2800_config_filter(struct rt2x00_
|
||||
!(filter_flags & FIF_FCSFAIL));
|
||||
rt2x00_set_field32(®, RX_FILTER_CFG_DROP_PHY_ERROR,
|
||||
!(filter_flags & FIF_PLCPFAIL));
|
||||
- rt2x00_set_field32(®, RX_FILTER_CFG_DROP_NOT_TO_ME, 1);
|
||||
+ rt2x00_set_field32(®, RX_FILTER_CFG_DROP_NOT_TO_ME,
|
||||
+ !rt2x00dev->is_monitoring);
|
||||
rt2x00_set_field32(®, RX_FILTER_CFG_DROP_NOT_MY_BSSD, 0);
|
||||
rt2x00_set_field32(®, RX_FILTER_CFG_DROP_VER_ERROR, 1);
|
||||
rt2x00_set_field32(®, RX_FILTER_CFG_DROP_MULTICAST,
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
||||
@@ -844,11 +844,13 @@ struct rt2x00_dev {
|
||||
* - Open sta interface count.
|
||||
* - Association count.
|
||||
* - Beaconing enabled count.
|
||||
+ * - Whether the device is monitoring.
|
||||
*/
|
||||
unsigned int intf_ap_count;
|
||||
unsigned int intf_sta_count;
|
||||
unsigned int intf_associated;
|
||||
unsigned int intf_beaconing;
|
||||
+ bool is_monitoring;
|
||||
|
||||
/*
|
||||
* Interface combinations
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00config.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00config.c
|
||||
@@ -244,6 +244,16 @@ void rt2x00lib_config(struct rt2x00_dev
|
||||
(ieee80211_flags & IEEE80211_CONF_CHANGE_PS))
|
||||
cancel_delayed_work_sync(&rt2x00dev->autowakeup_work);
|
||||
|
||||
+ if (ieee80211_flags & IEEE80211_CONF_CHANGE_MONITOR) {
|
||||
+ if (conf->flags & IEEE80211_CONF_MONITOR) {
|
||||
+ rt2x00_dbg(rt2x00dev, "Monitor mode is enabled\n");
|
||||
+ rt2x00dev->is_monitoring = true;
|
||||
+ } else {
|
||||
+ rt2x00_dbg(rt2x00dev, "Monitor mode is disabled\n");
|
||||
+ rt2x00dev->is_monitoring = false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Start configuration.
|
||||
*/
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||
@@ -1204,6 +1204,7 @@ int rt2x00lib_start(struct rt2x00_dev *r
|
||||
rt2x00dev->intf_ap_count = 0;
|
||||
rt2x00dev->intf_sta_count = 0;
|
||||
rt2x00dev->intf_associated = 0;
|
||||
+ rt2x00dev->is_monitoring = false;
|
||||
|
||||
/* Enable the radio */
|
||||
retval = rt2x00lib_enable_radio(rt2x00dev);
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
|
||||
@@ -385,11 +385,6 @@ void rt2x00mac_configure_filter(struct i
|
||||
*total_flags |= FIF_PSPOLL;
|
||||
}
|
||||
|
||||
- /*
|
||||
- * Check if there is any work left for us.
|
||||
- */
|
||||
- if (rt2x00dev->packet_filter == *total_flags)
|
||||
- return;
|
||||
rt2x00dev->packet_filter = *total_flags;
|
||||
|
||||
rt2x00dev->ops->lib->config_filter(rt2x00dev, *total_flags);
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt61pci.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt61pci.c
|
||||
@@ -530,8 +530,10 @@ static void rt61pci_config_filter(struct
|
||||
!(filter_flags & FIF_PLCPFAIL));
|
||||
rt2x00_set_field32(®, TXRX_CSR0_DROP_CONTROL,
|
||||
!(filter_flags & (FIF_CONTROL | FIF_PSPOLL)));
|
||||
- rt2x00_set_field32(®, TXRX_CSR0_DROP_NOT_TO_ME, 1);
|
||||
+ rt2x00_set_field32(®, TXRX_CSR0_DROP_NOT_TO_ME,
|
||||
+ !rt2x00dev->is_monitoring);
|
||||
rt2x00_set_field32(®, TXRX_CSR0_DROP_TO_DS,
|
||||
+ !rt2x00dev->is_monitoring &&
|
||||
!rt2x00dev->intf_ap_count);
|
||||
rt2x00_set_field32(®, TXRX_CSR0_DROP_VERSION_ERROR, 1);
|
||||
rt2x00_set_field32(®, TXRX_CSR0_DROP_MULTICAST,
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt73usb.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt73usb.c
|
||||
@@ -480,8 +480,10 @@ static void rt73usb_config_filter(struct
|
||||
!(filter_flags & FIF_PLCPFAIL));
|
||||
rt2x00_set_field32(®, TXRX_CSR0_DROP_CONTROL,
|
||||
!(filter_flags & (FIF_CONTROL | FIF_PSPOLL)));
|
||||
- rt2x00_set_field32(®, TXRX_CSR0_DROP_NOT_TO_ME, 1);
|
||||
+ rt2x00_set_field32(®, TXRX_CSR0_DROP_NOT_TO_ME,
|
||||
+ !rt2x00dev->is_monitoring);
|
||||
rt2x00_set_field32(®, TXRX_CSR0_DROP_TO_DS,
|
||||
+ !rt2x00dev->is_monitoring &&
|
||||
!rt2x00dev->intf_ap_count);
|
||||
rt2x00_set_field32(®, TXRX_CSR0_DROP_VERSION_ERROR, 1);
|
||||
rt2x00_set_field32(®, TXRX_CSR0_DROP_MULTICAST,
|
@ -0,0 +1,32 @@ |
||||
From: Miaoqing Pan <miaoqing@codeaurora.org>
|
||||
Date: Fri, 15 Jan 2016 18:17:17 +0800
|
||||
Subject: [PATCH] ath9k: avoid ANI restart if no trigger
|
||||
|
||||
Fixes commit 54da20d83f0e ("ath9k_hw: improve ANI processing and rx desensitizing parameters")
|
||||
|
||||
Call ath9k_ani_restart() only when the phy error rate reach the
|
||||
ANI immunity threshold. Sync the logic with internal code base.
|
||||
|
||||
Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/ani.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ani.c
|
||||
@@ -444,14 +444,16 @@ void ath9k_hw_ani_monitor(struct ath_hw
|
||||
ofdmPhyErrRate < ah->config.ofdm_trig_low) {
|
||||
ath9k_hw_ani_lower_immunity(ah);
|
||||
aniState->ofdmsTurn = !aniState->ofdmsTurn;
|
||||
+ ath9k_ani_restart(ah);
|
||||
} else if (ofdmPhyErrRate > ah->config.ofdm_trig_high) {
|
||||
ath9k_hw_ani_ofdm_err_trigger(ah);
|
||||
aniState->ofdmsTurn = false;
|
||||
+ ath9k_ani_restart(ah);
|
||||
} else if (cckPhyErrRate > ah->config.cck_trig_high) {
|
||||
ath9k_hw_ani_cck_err_trigger(ah);
|
||||
aniState->ofdmsTurn = true;
|
||||
+ ath9k_ani_restart(ah);
|
||||
}
|
||||
- ath9k_ani_restart(ah);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_ani_monitor);
|
@ -1,48 +0,0 @@ |
||||
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
||||
Date: Sun, 20 Dec 2015 13:50:00 +0200
|
||||
Subject: [PATCH] mac80211: fix PS-Poll handling
|
||||
|
||||
My commit below broken PS-Poll handling. In case the driver
|
||||
has no frames buffered, driver_release_tids will be 0, but
|
||||
calling find_highest_prio_tid() with 0 as a parameter is
|
||||
not a good idea:
|
||||
fls(0) - 1 = -1.
|
||||
This bug caused mac80211 to think that frames were buffered
|
||||
in the driver which in turn was confused because mac80211
|
||||
was asking to release frames that were not reported to
|
||||
exist.
|
||||
On iwlwifi, this led to the WARNING below:
|
||||
|
||||
WARNING: CPU: 0 PID: 11230 at drivers/net/wireless/intel/iwlwifi/mvm/sta.c:1733 iwl_mvm_sta_modify_sleep_tx_count+0x2af/0x320 [iwlmvm]()
|
||||
ffffffffc0627c60 ffff8800069b7648 ffffffff81888913 0000000000000000
|
||||
0000000000000000 ffff8800069b7688 ffffffff81089d6a ffff8800069b7678
|
||||
0000000000000001 ffff88003b35abf0 ffff88000698b128 ffff8800069b76d4
|
||||
Call Trace:
|
||||
[<ffffffff81888913>] dump_stack+0x4c/0x65
|
||||
[<ffffffff81089d6a>] warn_slowpath_common+0x8a/0xc0
|
||||
[<ffffffff81089e5a>] warn_slowpath_null+0x1a/0x20
|
||||
[<ffffffffc05f36bf>] iwl_mvm_sta_modify_sleep_tx_count+0x2af/0x320 [iwlmvm]
|
||||
[<ffffffffc05dae41>] iwl_mvm_mac_release_buffered_frames+0x31/0x40 [iwlmvm]
|
||||
[<ffffffffc045d8b6>] ieee80211_sta_ps_deliver_response+0x6e6/0xd80 [mac80211]
|
||||
[<ffffffffc0461296>] ieee80211_sta_ps_deliver_poll_response+0x26/0x30 [mac80211]
|
||||
[<ffffffffc048f743>] ieee80211_rx_handlers+0xa83/0x2900 [mac80211]
|
||||
[<ffffffffc04917ad>] ieee80211_prepare_and_rx_handle+0x1ed/0xa70 [mac80211]
|
||||
[<ffffffffc045e3d5>] ? sta_info_get_bss+0x5/0x4a0 [mac80211]
|
||||
[<ffffffffc04925b6>] ieee80211_rx_napi+0x586/0xcd0 [mac80211]
|
||||
[<ffffffffc05eaa3e>] iwl_mvm_rx_rx_mpdu+0x59e/0xc60 [iwlmvm]
|
||||
|
||||
Fixes: 0ead2510f8ce ("mac80211: allow the driver to send EOSP when needed")
|
||||
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -1453,7 +1453,7 @@ ieee80211_sta_ps_deliver_response(struct
|
||||
|
||||
more_data = ieee80211_sta_ps_more_data(sta, ignored_acs, reason, driver_release_tids);
|
||||
|
||||
- if (reason == IEEE80211_FRAME_RELEASE_PSPOLL)
|
||||
+ if (driver_release_tids && reason == IEEE80211_FRAME_RELEASE_PSPOLL)
|
||||
driver_release_tids =
|
||||
BIT(find_highest_prio_tid(driver_release_tids));
|
||||
|
@ -0,0 +1,91 @@ |
||||
From: Miaoqing Pan <miaoqing@codeaurora.org>
|
||||
Date: Fri, 15 Jan 2016 18:17:18 +0800
|
||||
Subject: [PATCH] ath9k: clean up ANI per-channel pointer checking
|
||||
|
||||
commit c24bd3620c50 ("ath9k: Do not maintain ANI state per-channel")
|
||||
removed per-channel handling, the code to check 'curchan' also
|
||||
should be removed as never used.
|
||||
|
||||
Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/ani.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ani.c
|
||||
@@ -126,12 +126,8 @@ static void ath9k_hw_update_mibstats(str
|
||||
|
||||
static void ath9k_ani_restart(struct ath_hw *ah)
|
||||
{
|
||||
- struct ar5416AniState *aniState;
|
||||
-
|
||||
- if (!ah->curchan)
|
||||
- return;
|
||||
+ struct ar5416AniState *aniState = &ah->ani;
|
||||
|
||||
- aniState = &ah->ani;
|
||||
aniState->listenTime = 0;
|
||||
|
||||
ENABLE_REGWRITE_BUFFER(ah);
|
||||
@@ -221,12 +217,7 @@ static void ath9k_hw_set_ofdm_nil(struct
|
||||
|
||||
static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)
|
||||
{
|
||||
- struct ar5416AniState *aniState;
|
||||
-
|
||||
- if (!ah->curchan)
|
||||
- return;
|
||||
-
|
||||
- aniState = &ah->ani;
|
||||
+ struct ar5416AniState *aniState = &ah->ani;
|
||||
|
||||
if (aniState->ofdmNoiseImmunityLevel < ATH9K_ANI_OFDM_MAX_LEVEL)
|
||||
ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel + 1, false);
|
||||
@@ -281,12 +272,7 @@ static void ath9k_hw_set_cck_nil(struct
|
||||
|
||||
static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah)
|
||||
{
|
||||
- struct ar5416AniState *aniState;
|
||||
-
|
||||
- if (!ah->curchan)
|
||||
- return;
|
||||
-
|
||||
- aniState = &ah->ani;
|
||||
+ struct ar5416AniState *aniState = &ah->ani;
|
||||
|
||||
if (aniState->cckNoiseImmunityLevel < ATH9K_ANI_CCK_MAX_LEVEL)
|
||||
ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel + 1,
|
||||
@@ -299,9 +285,7 @@ static void ath9k_hw_ani_cck_err_trigger
|
||||
*/
|
||||
static void ath9k_hw_ani_lower_immunity(struct ath_hw *ah)
|
||||
{
|
||||
- struct ar5416AniState *aniState;
|
||||
-
|
||||
- aniState = &ah->ani;
|
||||
+ struct ar5416AniState *aniState = &ah->ani;
|
||||
|
||||
/* lower OFDM noise immunity */
|
||||
if (aniState->ofdmNoiseImmunityLevel > 0 &&
|
||||
@@ -329,7 +313,7 @@ void ath9k_ani_reset(struct ath_hw *ah,
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
int ofdm_nil, cck_nil;
|
||||
|
||||
- if (!ah->curchan)
|
||||
+ if (!chan)
|
||||
return;
|
||||
|
||||
BUG_ON(aniState == NULL);
|
||||
@@ -416,14 +400,10 @@ static bool ath9k_hw_ani_read_counters(s
|
||||
|
||||
void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan)
|
||||
{
|
||||
- struct ar5416AniState *aniState;
|
||||
+ struct ar5416AniState *aniState = &ah->ani;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
u32 ofdmPhyErrRate, cckPhyErrRate;
|
||||
|
||||
- if (!ah->curchan)
|
||||
- return;
|
||||
-
|
||||
- aniState = &ah->ani;
|
||||
if (!ath9k_hw_ani_read_counters(ah))
|
||||
return;
|
||||
|
@ -0,0 +1,31 @@ |
||||
From: Miaoqing Pan <miaoqing@codeaurora.org>
|
||||
Date: Fri, 15 Jan 2016 18:17:19 +0800
|
||||
Subject: [PATCH] ath9k: do not reset while BB panic(0x4000409) on ar9561
|
||||
|
||||
BB panic(0x4000409) observed while AP enabling/disabling
|
||||
bursting.
|
||||
|
||||
Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
@@ -2071,7 +2071,8 @@ void ar9003_hw_attach_phy_ops(struct ath
|
||||
* to be disabled.
|
||||
*
|
||||
* 0x04000409: Packet stuck on receive.
|
||||
- * Full chip reset is required for all chips except AR9340.
|
||||
+ * Full chip reset is required for all chips except
|
||||
+ * AR9340, AR9531 and AR9561.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -2100,7 +2101,7 @@ bool ar9003_hw_bb_watchdog_check(struct
|
||||
case 0x04000b09:
|
||||
return true;
|
||||
case 0x04000409:
|
||||
- if (AR_SREV_9340(ah) || AR_SREV_9531(ah))
|
||||
+ if (AR_SREV_9340(ah) || AR_SREV_9531(ah) || AR_SREV_9561(ah))
|
||||
return false;
|
||||
else
|
||||
return true;
|
@ -0,0 +1,27 @@ |
||||
From: Miaoqing Pan <miaoqing@codeaurora.org>
|
||||
Date: Fri, 15 Jan 2016 18:17:20 +0800
|
||||
Subject: [PATCH] ath9k: fix inconsistent use of tab and space in
|
||||
indentation
|
||||
|
||||
Minor changes for indenting.
|
||||
|
||||
Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
|
||||
@@ -5485,11 +5485,11 @@ unsigned int ar9003_get_paprd_scale_fact
|
||||
AR9300_PAPRD_SCALE_1);
|
||||
else {
|
||||
if (chan->channel >= 5700)
|
||||
- return MS(le32_to_cpu(eep->modalHeader5G.papdRateMaskHt20),
|
||||
- AR9300_PAPRD_SCALE_1);
|
||||
+ return MS(le32_to_cpu(eep->modalHeader5G.papdRateMaskHt20),
|
||||
+ AR9300_PAPRD_SCALE_1);
|
||||
else if (chan->channel >= 5400)
|
||||
return MS(le32_to_cpu(eep->modalHeader5G.papdRateMaskHt40),
|
||||
- AR9300_PAPRD_SCALE_2);
|
||||
+ AR9300_PAPRD_SCALE_2);
|
||||
else
|
||||
return MS(le32_to_cpu(eep->modalHeader5G.papdRateMaskHt40),
|
||||
AR9300_PAPRD_SCALE_1);
|
@ -0,0 +1,65 @@ |
||||
From: Miaoqing Pan <miaoqing@codeaurora.org>
|
||||
Date: Fri, 15 Jan 2016 18:17:21 +0800
|
||||
Subject: [PATCH] ath9k: fix data bus error on ar9300 and ar9580
|
||||
|
||||
One crash issue be found on ar9300: RTC_RC reg read leads crash, leading
|
||||
the data bus error, due to RTC_RC reg write not happen properly.
|
||||
|
||||
Warm Reset trigger in continuous beacon stuck for one of the customer for
|
||||
other chip, noticed the MAC was stuck in RTC reset. After analysis noticed
|
||||
DMA did not complete when RTC was put in reset.
|
||||
|
||||
So, before resetting the MAC need to make sure there are no pending DMA
|
||||
transactions because this reset does not reset all parts of the chip.
|
||||
|
||||
The 12th and 11th bit of MAC _DMA_CFG register used to do that.
|
||||
12 cfg_halt_ack 0x0
|
||||
0 DMA has not yet halted
|
||||
1 DMA has halted
|
||||
11 cfg_halt_req 0x0
|
||||
0 DMA logic operates normally
|
||||
1 Request DMA logic to stop so software can reset the MAC
|
||||
|
||||
The Bit [12] of this register indicates when the halt has taken effect or
|
||||
not. the DMA halt IS NOT recoverable; once software sets bit [11] to
|
||||
request a DMA halt, software must wait for bit [12] to be set and reset
|
||||
the MAC.
|
||||
|
||||
So, the same thing we implemented for ar9580 chip.
|
||||
|
||||
Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1368,6 +1368,16 @@ static bool ath9k_hw_set_reset(struct at
|
||||
if (ath9k_hw_mci_is_enabled(ah))
|
||||
ar9003_mci_check_gpm_offset(ah);
|
||||
|
||||
+ /* DMA HALT added to resolve ar9300 and ar9580 bus error during
|
||||
+ * RTC_RC reg read
|
||||
+ */
|
||||
+ if (AR_SREV_9300(ah) || AR_SREV_9580(ah)) {
|
||||
+ REG_SET_BIT(ah, AR_CFG, AR_CFG_HALT_REQ);
|
||||
+ ath9k_hw_wait(ah, AR_CFG, AR_CFG_HALT_ACK, AR_CFG_HALT_ACK,
|
||||
+ 20 * AH_WAIT_TIMEOUT);
|
||||
+ REG_CLR_BIT(ah, AR_CFG, AR_CFG_HALT_REQ);
|
||||
+ }
|
||||
+
|
||||
REG_WRITE(ah, AR_RTC_RC, rst_flags);
|
||||
|
||||
REGWRITE_BUFFER_FLUSH(ah);
|
||||
--- a/drivers/net/wireless/ath/ath9k/reg.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/reg.h
|
||||
@@ -34,8 +34,10 @@
|
||||
#define AR_CFG_SWRG 0x00000010
|
||||
#define AR_CFG_AP_ADHOC_INDICATION 0x00000020
|
||||
#define AR_CFG_PHOK 0x00000100
|
||||
-#define AR_CFG_CLK_GATE_DIS 0x00000400
|
||||
#define AR_CFG_EEBS 0x00000200
|
||||
+#define AR_CFG_CLK_GATE_DIS 0x00000400
|
||||
+#define AR_CFG_HALT_REQ 0x00000800
|
||||
+#define AR_CFG_HALT_ACK 0x00001000
|
||||
#define AR_CFG_PCI_MASTER_REQ_Q_THRESH 0x00060000
|
||||
#define AR_CFG_PCI_MASTER_REQ_Q_THRESH_S 17
|
||||
|
@ -0,0 +1,19 @@ |
||||
From: Felix Fietkau <nbd@openwrt.org>
|
||||
Date: Fri, 15 Jan 2016 15:59:45 +0100
|
||||
Subject: [PATCH] brcmfmac: add missing include
|
||||
|
||||
linux/module.h is required for defining module parameters
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/netdevice.h>
|
||||
+#include <linux/module.h>
|
||||
#include <brcmu_wifi.h>
|
||||
#include <brcmu_utils.h>
|
||||
#include "core.h"
|
Loading…
Reference in new issue