[PATCH 1/4] brcm80211: use proper ieee80211 routines
Gábor Stefanik
netrolller.3d at gmail.com
Sun Feb 27 22:30:10 UTC 2011
On Sun, Feb 27, 2011 at 11:24 PM, Dan Carpenter <error27 at gmail.com> wrote:
> On Sun, Feb 27, 2011 at 11:28:18PM +0300, Stanislav Fomichev wrote:
>> --- a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
>> +++ b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
>> @@ -637,11 +637,12 @@ wlc_sendampdu(struct ampdu_info *ampdu, wlc_txq_info_t *qi,
>> mcl |= TXC_STARTMSDU;
>> rts = (struct ieee80211_rts *)&txh->rts_frame;
>> fc = le16_to_cpu(rts->frame_control);
>> - if ((fc & FC_KIND_MASK) == FC_RTS) {
>> +
>> + if (ieee80211_is_rts(rts->frame_control)) {
>
> fc isn't used anymore so it can be removed.
>
>> @@ -6051,7 +6044,8 @@ wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw,
>> txrate[1]->count = 0;
>>
>> /* (2) PROTECTION, may change rspec */
>> - if ((ieee80211_is_data(fc) || ieee80211_is_mgmt(fc)) &&
>> + if ((ieee80211_is_data(h->frame_control) ||
>> + ieee80211_is_mgmt(h->frame_control)) &&
>
> This is a bugfix because fc is cpu endian and h->frame_control is big
> endian. Thank you for fixing the bug, :), but please not behavior
> changes in the commit message.
>
>> @@ -6684,7 +6680,7 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
>> tx_rts_count =
>> (txs->status & TX_STATUS_RTS_RTX_MASK) >> TX_STATUS_RTS_RTX_SHIFT;
>>
>> - lastframe = (fc & IEEE80211_FCTL_MOREFRAGS) == 0;
>> + lastframe = ieee80211_has_morefrags(h->frame_control);
>
> This is reversed. It should be:
> if (ieee80211_has_morefrags(h->frame_control))
> lastframe = false;
> else
> lastframe = true;
lastframe = !ieee80211_has_morefrags(h->frame_control);
>
> regards,
> dan carpenter
> _______________________________________________
> devel mailing list
> devel at linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
>
--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
More information about the devel
mailing list