aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/mac.c
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qti.qualcomm.com>2014-05-19 02:14:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-05-19 16:42:15 -0400
commit08232bf94949eabaabfcc2987025aed378aa13ae (patch)
tree02620e03af5ce05e23dc4d319c26d62f93a42baa /drivers/net/wireless/ath/ath9k/mac.c
parent1db10595c6c7274930de3d2ed525e0f6bd817b9d (diff)
ath9k_hw: Abort transmission for sleeping station
The data transmission to the power save station should be aborted immediately, whenever the station informs sleep state. Right now the frames queued into into hardware are being transmitted until the hardware detects the power save station based excessive retries of the data frames due to unacknowlegdement. Then remaining frames are returned with filetered status and might be retried later by driver or mac80211. Per WFA certification testing, AP should not send out more than two frames after processing nullfunc with PM bit set from associated station. To speed up tx filtering, the pending frames in hardware queues for given station will be aborted immediately via tx filter registers. This transmit filters can be ignored if the descriptor is having invalid destination index or clear destination mask set. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/mac.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/mac.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index 51ce36f108f9..275205ab5f15 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -958,3 +958,25 @@ void ath9k_hw_set_interrupts(struct ath_hw *ah)
958 return; 958 return;
959} 959}
960EXPORT_SYMBOL(ath9k_hw_set_interrupts); 960EXPORT_SYMBOL(ath9k_hw_set_interrupts);
961
962#define ATH9K_HW_MAX_DCU 10
963#define ATH9K_HW_SLICE_PER_DCU 16
964#define ATH9K_HW_BIT_IN_SLICE 16
965void ath9k_hw_set_tx_filter(struct ath_hw *ah, u8 destidx, bool set)
966{
967 int dcu_idx;
968 u32 filter;
969
970 for (dcu_idx = 0; dcu_idx < 10; dcu_idx++) {
971 filter = SM(set, AR_D_TXBLK_WRITE_COMMAND);
972 filter |= SM(dcu_idx, AR_D_TXBLK_WRITE_DCU);
973 filter |= SM((destidx / ATH9K_HW_SLICE_PER_DCU),
974 AR_D_TXBLK_WRITE_SLICE);
975 filter |= BIT(destidx % ATH9K_HW_BIT_IN_SLICE);
976 ath_dbg(ath9k_hw_common(ah), PS,
977 "DCU%d staid %d set %d txfilter %08x\n",
978 dcu_idx, destidx, set, filter);
979 REG_WRITE(ah, AR_D_TXBLK_BASE, filter);
980 }
981}
982EXPORT_SYMBOL(ath9k_hw_set_tx_filter);