From: Felix Fietkau Date: Thu, 15 Sep 2011 07:37:46 +0000 (+0200) Subject: mac80211: fix endian issues and comments for BAR failure handling X-Git-Tag: v3.12-rc1~4599^2~254^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7107676a3a46415c27186bc7d5ce988498897c66;p=kernel%2Fkernel-generic.git mac80211: fix endian issues and comments for BAR failure handling Signed-off-by: Felix Fietkau Cc: Helmut Schaa Signed-off-by: John W. Linville --- diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 1426846..d50358c 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -278,17 +278,19 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) } if (!acked && ieee80211_is_back_req(fc)) { + u16 control; + /* - * BAR failed, let's tear down the BA session as a - * last resort as some STAs (Intel 5100 on Windows) - * can get stuck when the BA window isn't flushed - * correctly. + * BAR failed, store the last SSN and retry sending + * the BAR when the next unicast transmission on the + * same TID succeeds. */ bar = (struct ieee80211_bar *) skb->data; - if (!(bar->control & IEEE80211_BAR_CTRL_MULTI_TID)) { + control = le16_to_cpu(bar->control); + if (!(control & IEEE80211_BAR_CTRL_MULTI_TID)) { u16 ssn = le16_to_cpu(bar->start_seq_num); - tid = (bar->control & + tid = (control & IEEE80211_BAR_CTRL_TID_INFO_MASK) >> IEEE80211_BAR_CTRL_TID_INFO_SHIFT;