diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-04-23 10:10:04 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-06 15:14:33 -0400 |
commit | 57c4d7b4c4986037be51476b8e3025d5ba18d8b8 (patch) | |
tree | bcd24a127b4c79891f45799a20867f49c0f7f949 /net/mac80211/main.c | |
parent | f3b85252f081581a8f257545ed748062dce7798b (diff) |
mac80211: clean up beacon interval settings
We currently have two beacon interval configuration knobs:
hw.conf.beacon_int and vif.bss_info.beacon_int. This is
rather confusing, even though the former is used when we
beacon ourselves and the latter when we are associated to
an AP.
This just deprecates the hw.conf.beacon_int setting in favour
of always using vif.bss_info.beacon_int. Since it touches all
the beaconing IBSS code anyway, we can also add support for
the cfg80211 IBSS beacon interval configuration easily.
NOTE: The hw.conf.beacon_int setting is retained for now due
to drivers still using it -- I couldn't untangle all
drivers, some are updated in this patch.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index e00d124e4ef7..b254879d8631 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -294,9 +294,6 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | |||
294 | { | 294 | { |
295 | struct ieee80211_local *local = sdata->local; | 295 | struct ieee80211_local *local = sdata->local; |
296 | 296 | ||
297 | if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_AP_VLAN)) | ||
298 | return; | ||
299 | |||
300 | if (!changed) | 297 | if (!changed) |
301 | return; | 298 | return; |
302 | 299 | ||
@@ -305,6 +302,17 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | |||
305 | &sdata->vif, | 302 | &sdata->vif, |
306 | &sdata->vif.bss_conf, | 303 | &sdata->vif.bss_conf, |
307 | changed); | 304 | changed); |
305 | |||
306 | /* | ||
307 | * DEPRECATED | ||
308 | * | ||
309 | * ~changed is just there to not do this at resume time | ||
310 | */ | ||
311 | if (changed & BSS_CHANGED_BEACON_INT && ~changed) { | ||
312 | local->hw.conf.beacon_int = sdata->vif.bss_conf.beacon_int; | ||
313 | ieee80211_hw_config(local, | ||
314 | _IEEE80211_CONF_CHANGE_BEACON_INTERVAL); | ||
315 | } | ||
308 | } | 316 | } |
309 | 317 | ||
310 | u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata) | 318 | u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata) |
@@ -971,9 +979,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
971 | 979 | ||
972 | debugfs_hw_add(local); | 980 | debugfs_hw_add(local); |
973 | 981 | ||
974 | if (local->hw.conf.beacon_int < 10) | ||
975 | local->hw.conf.beacon_int = 100; | ||
976 | |||
977 | if (local->hw.max_listen_interval == 0) | 982 | if (local->hw.max_listen_interval == 0) |
978 | local->hw.max_listen_interval = 1; | 983 | local->hw.max_listen_interval = 1; |
979 | 984 | ||