diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-04-23 10:13:26 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-06 15:14:36 -0400 |
commit | 2d0ddec5b2b859f06116f631fc0ffe94fbceb556 (patch) | |
tree | 9bf3cdfcbbefcb34f5984e6d797f488ebe358196 /drivers/net/wireless/mac80211_hwsim.c | |
parent | 57c4d7b4c4986037be51476b8e3025d5ba18d8b8 (diff) |
mac80211: unify config_interface and bss_info_changed
The config_interface method is a little strange, it contains the
BSSID and beacon updates, while bss_info_changed contains most
other BSS information for each interface. This patch removes
config_interface and rolls all the information it previously
passed to drivers into bss_info_changed.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 24c95a619e4c..e67b424f925e 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -587,23 +587,6 @@ static void mac80211_hwsim_configure_filter(struct ieee80211_hw *hw, | |||
587 | *total_flags = data->rx_filter; | 587 | *total_flags = data->rx_filter; |
588 | } | 588 | } |
589 | 589 | ||
590 | static int mac80211_hwsim_config_interface(struct ieee80211_hw *hw, | ||
591 | struct ieee80211_vif *vif, | ||
592 | struct ieee80211_if_conf *conf) | ||
593 | { | ||
594 | struct hwsim_vif_priv *vp = (void *)vif->drv_priv; | ||
595 | |||
596 | hwsim_check_magic(vif); | ||
597 | if (conf->changed & IEEE80211_IFCC_BSSID) { | ||
598 | DECLARE_MAC_BUF(mac); | ||
599 | printk(KERN_DEBUG "%s:%s: BSSID changed: %pM\n", | ||
600 | wiphy_name(hw->wiphy), __func__, | ||
601 | conf->bssid); | ||
602 | memcpy(vp->bssid, conf->bssid, ETH_ALEN); | ||
603 | } | ||
604 | return 0; | ||
605 | } | ||
606 | |||
607 | static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw, | 590 | static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw, |
608 | struct ieee80211_vif *vif, | 591 | struct ieee80211_vif *vif, |
609 | struct ieee80211_bss_conf *info, | 592 | struct ieee80211_bss_conf *info, |
@@ -617,6 +600,13 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw, | |||
617 | printk(KERN_DEBUG "%s:%s(changed=0x%x)\n", | 600 | printk(KERN_DEBUG "%s:%s(changed=0x%x)\n", |
618 | wiphy_name(hw->wiphy), __func__, changed); | 601 | wiphy_name(hw->wiphy), __func__, changed); |
619 | 602 | ||
603 | if (changed & BSS_CHANGED_BSSID) { | ||
604 | printk(KERN_DEBUG "%s:%s: BSSID changed: %pM\n", | ||
605 | wiphy_name(hw->wiphy), __func__, | ||
606 | info->bssid); | ||
607 | memcpy(vp->bssid, info->bssid, ETH_ALEN); | ||
608 | } | ||
609 | |||
620 | if (changed & BSS_CHANGED_ASSOC) { | 610 | if (changed & BSS_CHANGED_ASSOC) { |
621 | printk(KERN_DEBUG " %s: ASSOC: assoc=%d aid=%d\n", | 611 | printk(KERN_DEBUG " %s: ASSOC: assoc=%d aid=%d\n", |
622 | wiphy_name(hw->wiphy), info->assoc, info->aid); | 612 | wiphy_name(hw->wiphy), info->assoc, info->aid); |
@@ -708,7 +698,6 @@ static const struct ieee80211_ops mac80211_hwsim_ops = | |||
708 | .remove_interface = mac80211_hwsim_remove_interface, | 698 | .remove_interface = mac80211_hwsim_remove_interface, |
709 | .config = mac80211_hwsim_config, | 699 | .config = mac80211_hwsim_config, |
710 | .configure_filter = mac80211_hwsim_configure_filter, | 700 | .configure_filter = mac80211_hwsim_configure_filter, |
711 | .config_interface = mac80211_hwsim_config_interface, | ||
712 | .bss_info_changed = mac80211_hwsim_bss_info_changed, | 701 | .bss_info_changed = mac80211_hwsim_bss_info_changed, |
713 | .sta_notify = mac80211_hwsim_sta_notify, | 702 | .sta_notify = mac80211_hwsim_sta_notify, |
714 | .set_tim = mac80211_hwsim_set_tim, | 703 | .set_tim = mac80211_hwsim_set_tim, |