diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00config.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c index 2b0edd20eea5..b4fad744503e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00config.c +++ b/drivers/net/wireless/rt2x00/rt2x00config.c | |||
@@ -166,6 +166,8 @@ void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, | |||
166 | else if (conf->antenna_sel_rx && | 166 | else if (conf->antenna_sel_rx && |
167 | conf->antenna_sel_rx != active_ant->rx) | 167 | conf->antenna_sel_rx != active_ant->rx) |
168 | flags |= CONFIG_UPDATE_ANTENNA; | 168 | flags |= CONFIG_UPDATE_ANTENNA; |
169 | else if (active_ant->rx == ANTENNA_SW_DIVERSITY) | ||
170 | flags |= CONFIG_UPDATE_ANTENNA; | ||
169 | 171 | ||
170 | if (!conf->antenna_sel_tx && | 172 | if (!conf->antenna_sel_tx && |
171 | default_ant->tx != ANTENNA_SW_DIVERSITY && | 173 | default_ant->tx != ANTENNA_SW_DIVERSITY && |
@@ -174,6 +176,8 @@ void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, | |||
174 | else if (conf->antenna_sel_tx && | 176 | else if (conf->antenna_sel_tx && |
175 | conf->antenna_sel_tx != active_ant->tx) | 177 | conf->antenna_sel_tx != active_ant->tx) |
176 | flags |= CONFIG_UPDATE_ANTENNA; | 178 | flags |= CONFIG_UPDATE_ANTENNA; |
179 | else if (active_ant->tx == ANTENNA_SW_DIVERSITY) | ||
180 | flags |= CONFIG_UPDATE_ANTENNA; | ||
177 | 181 | ||
178 | /* | 182 | /* |
179 | * The following configuration options are never | 183 | * The following configuration options are never |
@@ -262,11 +266,17 @@ config: | |||
262 | if (flags & (CONFIG_UPDATE_CHANNEL | CONFIG_UPDATE_ANTENNA)) | 266 | if (flags & (CONFIG_UPDATE_CHANNEL | CONFIG_UPDATE_ANTENNA)) |
263 | rt2x00lib_reset_link_tuner(rt2x00dev); | 267 | rt2x00lib_reset_link_tuner(rt2x00dev); |
264 | 268 | ||
265 | rt2x00dev->curr_hwmode = libconf.phymode; | 269 | if (flags & CONFIG_UPDATE_PHYMODE) { |
266 | rt2x00dev->rx_status.phymode = conf->phymode; | 270 | rt2x00dev->curr_hwmode = libconf.phymode; |
271 | rt2x00dev->rx_status.phymode = conf->phymode; | ||
272 | } | ||
273 | |||
267 | rt2x00dev->rx_status.freq = conf->freq; | 274 | rt2x00dev->rx_status.freq = conf->freq; |
268 | rt2x00dev->rx_status.channel = conf->channel; | 275 | rt2x00dev->rx_status.channel = conf->channel; |
269 | rt2x00dev->tx_power = conf->power_level; | 276 | rt2x00dev->tx_power = conf->power_level; |
270 | rt2x00dev->link.ant.active.rx = libconf.ant.rx; | 277 | |
271 | rt2x00dev->link.ant.active.tx = libconf.ant.tx; | 278 | if (flags & CONFIG_UPDATE_ANTENNA) { |
279 | rt2x00dev->link.ant.active.rx = libconf.ant.rx; | ||
280 | rt2x00dev->link.ant.active.tx = libconf.ant.tx; | ||
281 | } | ||
272 | } | 282 | } |