Search Linux Wireless

Re: [PATCH] mac80211: Tear down BA session on BAR tx failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 11, 2011 at 2:58 PM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
>> +             if (!acked && ieee80211_is_back_req(fc)) {
>> +                     /*
>> +                      * 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 = (struct ieee80211_bar *) skb->data;
>> +                     ieee80211_stop_tx_ba_session(&sta->sta,
>> +                                                  bar->control >> 12 & 0xf);
>> +             }
>
> Hmm, that shift & mask makes me think twice, are there constants, and
> maybe there should be some parentheses?

This just masks out the TID associated to this BA agreement and the shift
has a higher precedence then the bitwise &.

We don't have a suitable constant yet, a hardcoded 12 is also used in
ieee80211_send_bar. Hence, I guess a define would be suitable here.

I'll resend with the fixed typos and replace the 12 with a define.

Thanks,
Helmut
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux