mac80211: share STA information with driver
This patch changes mac80211 to share some more data about stations with drivers. Should help iwlwifi and ath9k when they get around to updating, and might also help with implementing rate control algorithms without internals. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
8aa21e6fd7
commit
17741cdc26
@@ -364,7 +364,7 @@ static int ieee80211_dump_station(struct wiphy *wiphy, struct net_device *dev,
|
||||
sta = sta_info_get_by_idx(local, idx, dev);
|
||||
if (sta) {
|
||||
ret = 0;
|
||||
memcpy(mac, sta->addr, ETH_ALEN);
|
||||
memcpy(mac, sta->sta.addr, ETH_ALEN);
|
||||
sta_set_sinfo(sta, sinfo);
|
||||
}
|
||||
|
||||
@@ -593,7 +593,7 @@ static void ieee80211_send_layer2_update(struct sta_info *sta)
|
||||
* Update response frame; IEEE Std 802.2-1998, 5.4.1.2.1 */
|
||||
|
||||
memset(msg->da, 0xff, ETH_ALEN);
|
||||
memcpy(msg->sa, sta->addr, ETH_ALEN);
|
||||
memcpy(msg->sa, sta->sta.addr, ETH_ALEN);
|
||||
msg->len = htons(6);
|
||||
msg->dsap = 0;
|
||||
msg->ssap = 0x01; /* NULL LSAP, CR Bit: Response */
|
||||
@@ -648,9 +648,9 @@ static void sta_apply_parameters(struct ieee80211_local *local,
|
||||
*/
|
||||
|
||||
if (params->aid) {
|
||||
sta->aid = params->aid;
|
||||
if (sta->aid > IEEE80211_MAX_AID)
|
||||
sta->aid = 0; /* XXX: should this be an error? */
|
||||
sta->sta.aid = params->aid;
|
||||
if (sta->sta.aid > IEEE80211_MAX_AID)
|
||||
sta->sta.aid = 0; /* XXX: should this be an error? */
|
||||
}
|
||||
|
||||
if (params->listen_interval >= 0)
|
||||
@@ -919,7 +919,7 @@ static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop,
|
||||
struct mpath_info *pinfo)
|
||||
{
|
||||
if (mpath->next_hop)
|
||||
memcpy(next_hop, mpath->next_hop->addr, ETH_ALEN);
|
||||
memcpy(next_hop, mpath->next_hop->sta.addr, ETH_ALEN);
|
||||
else
|
||||
memset(next_hop, 0, ETH_ALEN);
|
||||
|
||||
|
Reference in New Issue
Block a user