When associating to an AP we don't know if HT is negotiated until
we receive the AssocResp, so we can only set ni_txparms properly at that point. To make this possible make node_setuptxparms public as ieee80211_node_setuptxparms.
This commit is contained in:
parent
3ff9febde6
commit
d77148fbca
@ -225,8 +225,8 @@ ieee80211_node_unauthorize(struct ieee80211_node *ni)
|
||||
/*
|
||||
* Fix tx parameters for a node according to ``association state''.
|
||||
*/
|
||||
static void
|
||||
node_setuptxparms(struct ieee80211_node *ni)
|
||||
void
|
||||
ieee80211_node_setuptxparms(struct ieee80211_node *ni)
|
||||
{
|
||||
struct ieee80211vap *vap = ni->ni_vap;
|
||||
enum ieee80211_phymode mode;
|
||||
@ -794,7 +794,7 @@ ieee80211_sta_join(struct ieee80211vap *vap, struct ieee80211_channel *chan,
|
||||
IEEE80211_F_DOSORT);
|
||||
if (ieee80211_iserp_rateset(&ni->ni_rates))
|
||||
ni->ni_flags |= IEEE80211_NODE_ERP;
|
||||
node_setuptxparms(ni);
|
||||
ieee80211_node_setuptxparms(ni);
|
||||
|
||||
return ieee80211_sta_join1(ieee80211_ref_node(ni));
|
||||
}
|
||||
@ -1364,7 +1364,7 @@ ieee80211_fakeup_adhoc_node(struct ieee80211vap *vap,
|
||||
ni->ni_flags |= IEEE80211_NODE_FF;
|
||||
#endif
|
||||
}
|
||||
node_setuptxparms(ni);
|
||||
ieee80211_node_setuptxparms(ni);
|
||||
if (ic->ic_newassoc != NULL)
|
||||
ic->ic_newassoc(ni, 1);
|
||||
/* XXX not right for 802.1x/WPA */
|
||||
@ -1430,7 +1430,7 @@ ieee80211_add_neighbor(struct ieee80211vap *vap,
|
||||
ieee80211_init_neighbor(ni, wh, sp);
|
||||
if (ieee80211_iserp_rateset(&ni->ni_rates))
|
||||
ni->ni_flags |= IEEE80211_NODE_ERP;
|
||||
node_setuptxparms(ni);
|
||||
ieee80211_node_setuptxparms(ni);
|
||||
if (ic->ic_newassoc != NULL)
|
||||
ic->ic_newassoc(ni, 1);
|
||||
/* XXX not right for 802.1x/WPA */
|
||||
@ -2297,7 +2297,7 @@ ieee80211_node_join(struct ieee80211_node *ni, int resp)
|
||||
", turbo" : ""
|
||||
);
|
||||
|
||||
node_setuptxparms(ni);
|
||||
ieee80211_node_setuptxparms(ni);
|
||||
/* give driver a chance to setup state like ni_txrate */
|
||||
if (ic->ic_newassoc != NULL)
|
||||
ic->ic_newassoc(ni, newassoc);
|
||||
|
@ -286,6 +286,7 @@ ieee80211_node_is_authorized(const struct ieee80211_node *ni)
|
||||
void ieee80211_node_authorize(struct ieee80211_node *);
|
||||
void ieee80211_node_unauthorize(struct ieee80211_node *);
|
||||
|
||||
void ieee80211_node_setuptxparms(struct ieee80211_node *);
|
||||
void ieee80211_node_set_chan(struct ieee80211_node *,
|
||||
struct ieee80211_channel *);
|
||||
void ieee80211_create_ibss(struct ieee80211vap*, struct ieee80211_channel *);
|
||||
|
@ -1594,6 +1594,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0,
|
||||
ieee80211_setup_htrates(ni, htcap,
|
||||
IEEE80211_F_JOIN | IEEE80211_F_DOBRS);
|
||||
ieee80211_setup_basic_htrates(ni, htinfo);
|
||||
ieee80211_node_setuptxparms(ni);
|
||||
} else {
|
||||
#ifdef IEEE80211_SUPPORT_SUPERG
|
||||
if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_ATH))
|
||||
|
Loading…
Reference in New Issue
Block a user