aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 0ec18618fcfe..2306d7514fff 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -199,15 +199,7 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
199 return; 199 return;
200 200
201 if (sdata->vif.type == NL80211_IFTYPE_STATION) { 201 if (sdata->vif.type == NL80211_IFTYPE_STATION) {
202 /* 202 sdata->vif.bss_conf.bssid = sdata->u.mgd.bssid;
203 * While not associated, claim a BSSID of all-zeroes
204 * so that drivers don't do any weird things with the
205 * BSSID at that time.
206 */
207 if (sdata->vif.bss_conf.assoc)
208 sdata->vif.bss_conf.bssid = sdata->u.mgd.bssid;
209 else
210 sdata->vif.bss_conf.bssid = zero;
211 } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) 203 } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
212 sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid; 204 sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid;
213 else if (sdata->vif.type == NL80211_IFTYPE_AP) 205 else if (sdata->vif.type == NL80211_IFTYPE_AP)
@@ -535,6 +527,9 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
535 int priv_size, i; 527 int priv_size, i;
536 struct wiphy *wiphy; 528 struct wiphy *wiphy;
537 529
530 if (WARN_ON(ops->sta_state && (ops->sta_add || ops->sta_remove)))
531 return NULL;
532
538 /* Ensure 32-byte alignment of our private data and hw private data. 533 /* Ensure 32-byte alignment of our private data and hw private data.
539 * We use the wiphy priv data for both our ieee80211_local and for 534 * We use the wiphy priv data for both our ieee80211_local and for
540 * the driver's private data 535 * the driver's private data
@@ -702,6 +697,9 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
702 ) 697 )
703 return -EINVAL; 698 return -EINVAL;
704 699
700 if ((hw->flags & IEEE80211_HW_SCAN_WHILE_IDLE) && !local->ops->hw_scan)
701 return -EINVAL;
702
705 if (hw->max_report_rates == 0) 703 if (hw->max_report_rates == 0)
706 hw->max_report_rates = hw->max_rates; 704 hw->max_report_rates = hw->max_rates;
707 705