Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134075
b: refs/heads/master
c: 0efcdfd
h: refs/heads/master
i:
  134073: bcd844b
  134071: 06e5b0b
v: v3
  • Loading branch information
Alina Friedrichsen authored and John W. Linville committed Jan 29, 2009
1 parent 26b8375 commit 5a76ab0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: cca3e99861e883358ceb39ad17c9eaee082138a5
refs/heads/master: 0efcdfd6ed4e7ac74c45e7c3218fd1a7416fdb3f
9 changes: 7 additions & 2 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -2548,11 +2548,16 @@ int ieee80211_sta_set_bssid(struct ieee80211_sub_if_data *sdata, u8 *bssid)
{
struct ieee80211_if_sta *ifsta;
int res;
bool valid;

ifsta = &sdata->u.sta;
valid = is_valid_ether_addr(bssid);

if (memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0) {
memcpy(ifsta->bssid, bssid, ETH_ALEN);
if(valid)
memcpy(ifsta->bssid, bssid, ETH_ALEN);
else
memset(ifsta->bssid, 0, ETH_ALEN);
res = 0;
/*
* Hack! See also ieee80211_sta_set_ssid.
Expand All @@ -2566,7 +2571,7 @@ int ieee80211_sta_set_bssid(struct ieee80211_sub_if_data *sdata, u8 *bssid)
}
}

if (is_valid_ether_addr(bssid))
if (valid)
ifsta->flags |= IEEE80211_STA_BSSID_SET;
else
ifsta->flags &= ~IEEE80211_STA_BSSID_SET;
Expand Down

0 comments on commit 5a76ab0

Please sign in to comment.