Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150427
b: refs/heads/master
c: 9cef873
h: refs/heads/master
i:
  150425: 7b9c51a
  150423: 984e484
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed May 20, 2009
1 parent 7a54317 commit 63964ac
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bbcf3f02771e069d0e113fe9bb62c27b671abf97
refs/heads/master: 9cef873798dfcdc10ff40b02abf1de935ceeba85
16 changes: 12 additions & 4 deletions trunk/net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,18 +219,26 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
u32 changed)
{
struct ieee80211_local *local = sdata->local;
static const u8 zero[ETH_ALEN] = { 0 };

if (!changed)
return;

if (sdata->vif.type == NL80211_IFTYPE_STATION)
sdata->vif.bss_conf.bssid = sdata->u.mgd.bssid;
else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
if (sdata->vif.type == NL80211_IFTYPE_STATION) {
/*
* While not associated, claim a BSSID of all-zeroes
* so that drivers don't do any weird things with the
* BSSID at that time.
*/
if (sdata->vif.bss_conf.assoc)
sdata->vif.bss_conf.bssid = sdata->u.mgd.bssid;
else
sdata->vif.bss_conf.bssid = zero;
} else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid;
else if (sdata->vif.type == NL80211_IFTYPE_AP)
sdata->vif.bss_conf.bssid = sdata->dev->dev_addr;
else if (ieee80211_vif_is_mesh(&sdata->vif)) {
static const u8 zero[ETH_ALEN] = { 0 };
sdata->vif.bss_conf.bssid = zero;
} else {
WARN_ON(1);
Expand Down
10 changes: 7 additions & 3 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,10 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
* changed or not.
*/
bss_info_changed |= BSS_CHANGED_BASIC_RATES;

/* And the BSSID changed - we're associated now */
bss_info_changed |= BSS_CHANGED_BSSID;

ieee80211_bss_info_change_notify(sdata, bss_info_changed);

/* will be same as sdata */
Expand Down Expand Up @@ -1176,6 +1180,9 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
}

ieee80211_hw_config(local, config_changed);

/* And the BSSID changed -- not very interesting here */
changed |= BSS_CHANGED_BSSID;
ieee80211_bss_info_change_notify(sdata, changed);

rcu_read_lock();
Expand Down Expand Up @@ -2481,9 +2488,6 @@ int ieee80211_sta_set_bssid(struct ieee80211_sub_if_data *sdata, u8 *bssid)
ifmgd->flags &= ~IEEE80211_STA_BSSID_SET;
}

if (netif_running(sdata->dev))
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID);

return ieee80211_sta_commit(sdata);
}

Expand Down

0 comments on commit 63964ac

Please sign in to comment.