Prevents durationId field updates for injected frames
when this information is included in radiotap header.
It could be very useful for testing NAV update.

Signed-off-by: Marek Kwaczynski <marek.kwaczyn...@tieto.com>
---
 drivers/net/wireless/ath/ath9k/xmit.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/xmit.c 
b/drivers/net/wireless/ath/ath9k/xmit.c
index 87cbec4..c24c113 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1092,8 +1092,15 @@ static void ath_buf_set_rate(struct ath_softc *sc, 
struct ath_buf *bf,
        rates = bf->rates;
        hdr = (struct ieee80211_hdr *)skb->data;
 
-       /* set dur_update_en for l-sig computation except for PS-Poll frames */
-       info->dur_update = !ieee80211_is_pspoll(hdr->frame_control);
+       if (tx_info->flags & IEEE80211_TX_CTRL_NO_DUR_UPDATE) {
+               info->dur_update = 0;
+       } else {
+               /* set dur_update_en for l-sig computation except for PS-Poll
+                * frames
+                */
+               info->dur_update = !ieee80211_is_pspoll(hdr->frame_control);
+       }
+
        info->rtscts_rate = fi->rtscts_rate;
 
        for (i = 0; i < ARRAY_SIZE(bf->rates); i++) {
-- 
1.7.9.5

_______________________________________________
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to