qca / open-ath9k-htc-firmware

The firmware for QCA AR7010/AR9271 802.11n USB NICs
Other
429 stars 182 forks source link

Wrong check for ATH_SHORT_PREAMBLE flag in ath_tgt_send_mgt #47

Open vanhoefm opened 10 years ago

vanhoefm commented 10 years ago

In the function ath_tgt_send_mgt the following check is being made:

if (mh->flags == ATH_SHORT_PREAMBLE)
    shortPreamble = AH_TRUE;
else
    shortPreamble = AH_FALSE;

Either I'm missing something, or this is wrong. Even when fixed to use the & operator this check should not be performed here. A few lines above the mh->flags variable is used to extract other flags:

bf->bf_protmode = mh->flags & (IEEE80211_PROT_RTSCTS | IEEE80211_PROT_CTSONLY);

This correctly corresponds to the flags defined in the Linux driver in ath9k/htc.h. However it appears the driver does not use this particular field to set preamble length settings.

olerem commented 10 years ago

Looks like a bug or even more bugs. If you can investigate it and provide patches, it will be great :)