diff options
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_mac.c')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 665f76af2fec..68e2749b2ce8 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -727,15 +727,19 @@ static int zd_op_config_interface(struct ieee80211_hw *hw, | |||
727 | if (mac->type == IEEE80211_IF_TYPE_MESH_POINT || | 727 | if (mac->type == IEEE80211_IF_TYPE_MESH_POINT || |
728 | mac->type == IEEE80211_IF_TYPE_IBSS) { | 728 | mac->type == IEEE80211_IF_TYPE_IBSS) { |
729 | associated = true; | 729 | associated = true; |
730 | if (conf->beacon) { | 730 | if (conf->changed & IEEE80211_IFCC_BEACON) { |
731 | r = zd_mac_config_beacon(hw, conf->beacon); | 731 | struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); |
732 | |||
733 | if (!beacon) | ||
734 | return -ENOMEM; | ||
735 | r = zd_mac_config_beacon(hw, beacon); | ||
732 | if (r < 0) | 736 | if (r < 0) |
733 | return r; | 737 | return r; |
734 | r = zd_set_beacon_interval(&mac->chip, BCN_MODE_IBSS | | 738 | r = zd_set_beacon_interval(&mac->chip, BCN_MODE_IBSS | |
735 | hw->conf.beacon_int); | 739 | hw->conf.beacon_int); |
736 | if (r < 0) | 740 | if (r < 0) |
737 | return r; | 741 | return r; |
738 | kfree_skb(conf->beacon); | 742 | kfree_skb(beacon); |
739 | } | 743 | } |
740 | } else | 744 | } else |
741 | associated = is_valid_ether_addr(conf->bssid); | 745 | associated = is_valid_ether_addr(conf->bssid); |
@@ -889,17 +893,6 @@ static void zd_op_bss_info_changed(struct ieee80211_hw *hw, | |||
889 | } | 893 | } |
890 | } | 894 | } |
891 | 895 | ||
892 | static int zd_op_beacon_update(struct ieee80211_hw *hw, | ||
893 | struct sk_buff *skb) | ||
894 | { | ||
895 | struct zd_mac *mac = zd_hw_mac(hw); | ||
896 | zd_mac_config_beacon(hw, skb); | ||
897 | kfree_skb(skb); | ||
898 | zd_set_beacon_interval(&mac->chip, BCN_MODE_IBSS | | ||
899 | hw->conf.beacon_int); | ||
900 | return 0; | ||
901 | } | ||
902 | |||
903 | static const struct ieee80211_ops zd_ops = { | 896 | static const struct ieee80211_ops zd_ops = { |
904 | .tx = zd_op_tx, | 897 | .tx = zd_op_tx, |
905 | .start = zd_op_start, | 898 | .start = zd_op_start, |
@@ -910,7 +903,6 @@ static const struct ieee80211_ops zd_ops = { | |||
910 | .config_interface = zd_op_config_interface, | 903 | .config_interface = zd_op_config_interface, |
911 | .configure_filter = zd_op_configure_filter, | 904 | .configure_filter = zd_op_configure_filter, |
912 | .bss_info_changed = zd_op_bss_info_changed, | 905 | .bss_info_changed = zd_op_bss_info_changed, |
913 | .beacon_update = zd_op_beacon_update, | ||
914 | }; | 906 | }; |
915 | 907 | ||
916 | struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf) | 908 | struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf) |