Don't treat the node as an 11n node if 11n rates are disabled.

For now, the AMRR code only knows about _either_ MCS or non-MCS rates.
It doesn't know how to downgrade (ie, doing 11b CCK rates if MCS0 isn't
reliable.)

PR:		kern/183428
This commit is contained in:
Adrian Chadd 2013-10-31 02:04:53 +00:00
parent 30dfa97944
commit 7f0660a04b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257412

View File

@ -131,6 +131,12 @@ amrr_deinit(struct ieee80211vap *vap)
free(vap->iv_rs, M_80211_RATECTL);
}
/*
* Return whether 11n rates are possible.
*
* Some 11n devices may return HT information but no HT rates.
* Thus, we shouldn't treat them as an 11n node.
*/
static int
amrr_node_is_11n(struct ieee80211_node *ni)
{
@ -139,6 +145,8 @@ amrr_node_is_11n(struct ieee80211_node *ni)
return (0);
if (ni->ni_chan == IEEE80211_CHAN_ANYC)
return (0);
if (IEEE80211_IS_CHAN_HT(ni->ni_chan) && ni->ni_htrates.rs_nrates == 0)
return (0);
return (IEEE80211_IS_CHAN_HT(ni->ni_chan));
}