rt2x00: Don't alter rt2x00dev->default_ant
rt2x00dev->default_ant should be initialized once by the driver, and should not be changed afterwards. Because rt2x00lib_config_antenna() was using a reference to the struct antenna_setup it actually had the oppurtunity to change the default antenna setting and it actually did that during the validation. Instead of passing a pointer to antenna_setup the entire structure should be copied. Signed-off-by: Lars Ericsson <Lars_Ericsson@telia.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
a272a72066
commit
eb87eaac52
@@ -378,7 +378,7 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed)
|
||||
*/
|
||||
if (changed & IEEE80211_CONF_CHANGE_RADIO_ENABLED)
|
||||
rt2x00lib_config_antenna(rt2x00dev,
|
||||
&rt2x00dev->default_ant);
|
||||
rt2x00dev->default_ant);
|
||||
|
||||
/* Turn RX back on */
|
||||
rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
|
||||
|
Reference in New Issue
Block a user