mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 23:40:55 +07:00
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>
This commit is contained in:
parent
5e13336248
commit
a472780100
@ -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);
|
||||
if (r < 0)
|
||||
return r;
|
||||
r = zd_set_beacon_interval(&mac->chip, BCN_MODE_IBSS |
|
||||
hw->conf.beacon_int);
|
||||
if (r < 0)
|
||||
return r;
|
||||
kfree_skb(beacon);
|
||||
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
} else
|
||||
associated = is_valid_ether_addr(conf->bssid);
|
||||
|
Loading…
Reference in New Issue
Block a user