ath9k_htc: minor cleanup in ath9k_htc_add_station
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
327967cba4
commit
fed27f6faa
|
@ -489,24 +489,20 @@ static int ath9k_htc_add_station(struct ath9k_htc_priv *priv,
|
||||||
ista = (struct ath9k_htc_sta *) sta->drv_priv;
|
ista = (struct ath9k_htc_sta *) sta->drv_priv;
|
||||||
memcpy(&tsta.macaddr, sta->addr, ETH_ALEN);
|
memcpy(&tsta.macaddr, sta->addr, ETH_ALEN);
|
||||||
memcpy(&tsta.bssid, common->curbssid, ETH_ALEN);
|
memcpy(&tsta.bssid, common->curbssid, ETH_ALEN);
|
||||||
tsta.is_vif_sta = 0;
|
|
||||||
ista->index = sta_idx;
|
ista->index = sta_idx;
|
||||||
|
tsta.is_vif_sta = 0;
|
||||||
|
maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
|
||||||
|
sta->ht_cap.ampdu_factor);
|
||||||
|
tsta.maxampdu = cpu_to_be16(maxampdu);
|
||||||
} else {
|
} else {
|
||||||
memcpy(&tsta.macaddr, vif->addr, ETH_ALEN);
|
memcpy(&tsta.macaddr, vif->addr, ETH_ALEN);
|
||||||
tsta.is_vif_sta = 1;
|
tsta.is_vif_sta = 1;
|
||||||
|
tsta.maxampdu = cpu_to_be16(0xffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
tsta.sta_index = sta_idx;
|
tsta.sta_index = sta_idx;
|
||||||
tsta.vif_index = avp->index;
|
tsta.vif_index = avp->index;
|
||||||
|
|
||||||
if (!sta) {
|
|
||||||
tsta.maxampdu = cpu_to_be16(0xffff);
|
|
||||||
} else {
|
|
||||||
maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
|
|
||||||
sta->ht_cap.ampdu_factor);
|
|
||||||
tsta.maxampdu = cpu_to_be16(maxampdu);
|
|
||||||
}
|
|
||||||
|
|
||||||
WMI_CMD_BUF(WMI_NODE_CREATE_CMDID, &tsta);
|
WMI_CMD_BUF(WMI_NODE_CREATE_CMDID, &tsta);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if (sta)
|
if (sta)
|
||||||
|
|
Reference in New Issue