提交 a4727801 编写于 作者: J Johannes Berg 提交者: John W. Linville

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: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 5e133362
......@@ -768,13 +768,23 @@ static int zd_op_config_interface(struct ieee80211_hw *hw,
if (!beacon)
return -ENOMEM;
r = zd_mac_config_beacon(hw, beacon);
kfree_skb(beacon);
if (r < 0)
return r;
r = zd_set_beacon_interval(&mac->chip, BCN_MODE_IBSS |
hw->conf.beacon_int);
}
if (conf->changed & IEEE80211_IFCC_BEACON_ENABLED) {
u32 interval;
if (conf->enable_beacon)
interval = BCN_MODE_IBSS | hw->conf.beacon_int;
else
interval = 0;
r = zd_set_beacon_interval(&mac->chip, interval);
if (r < 0)
return r;
kfree_skb(beacon);
}
} else
associated = is_valid_ether_addr(conf->bssid);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册