aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1211rw
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-02-10 15:25:39 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-13 13:45:22 -0500
commita4727801004f255f589478b2d75ec00f0a9e30c5 (patch)
tree9998b3e43308ea98e86a51124177a683ada3dcf6 /drivers/net/wireless/zd1211rw
parent5e1333624827e7a91b2d2cc04ce978f050cae15e (diff)
zd1211rw: honour enable_beacon conf
This makes zd1211rw honour enable_beacon, as well as fixing a memory leak: the beacon skb is leaked when configuring it to the hardware fails. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index 732b69f40978..7579af27edbd 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -768,13 +768,23 @@ static int zd_op_config_interface(struct ieee80211_hw *hw,
768 if (!beacon) 768 if (!beacon)
769 return -ENOMEM; 769 return -ENOMEM;
770 r = zd_mac_config_beacon(hw, beacon); 770 r = zd_mac_config_beacon(hw, beacon);
771 kfree_skb(beacon);
772
771 if (r < 0) 773 if (r < 0)
772 return r; 774 return r;
773 r = zd_set_beacon_interval(&mac->chip, BCN_MODE_IBSS | 775 }
774 hw->conf.beacon_int); 776
777 if (conf->changed & IEEE80211_IFCC_BEACON_ENABLED) {
778 u32 interval;
779
780 if (conf->enable_beacon)
781 interval = BCN_MODE_IBSS | hw->conf.beacon_int;
782 else
783 interval = 0;
784
785 r = zd_set_beacon_interval(&mac->chip, interval);
775 if (r < 0) 786 if (r < 0)
776 return r; 787 return r;
777 kfree_skb(beacon);
778 } 788 }
779 } else 789 } else
780 associated = is_valid_ether_addr(conf->bssid); 790 associated = is_valid_ether_addr(conf->bssid);