aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00config.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00config.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00config.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c
index 4d5e87b015a0..7910147157b5 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -199,23 +199,15 @@ void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
199 * to work with untill the link tuner decides that an antenna 199 * to work with untill the link tuner decides that an antenna
200 * switch should be performed. 200 * switch should be performed.
201 */ 201 */
202 if (!conf->antenna_sel_rx && 202 if (default_ant->rx != ANTENNA_SW_DIVERSITY &&
203 default_ant->rx != ANTENNA_SW_DIVERSITY &&
204 default_ant->rx != active_ant->rx) 203 default_ant->rx != active_ant->rx)
205 flags |= CONFIG_UPDATE_ANTENNA; 204 flags |= CONFIG_UPDATE_ANTENNA;
206 else if (conf->antenna_sel_rx &&
207 conf->antenna_sel_rx != active_ant->rx)
208 flags |= CONFIG_UPDATE_ANTENNA;
209 else if (active_ant->rx == ANTENNA_SW_DIVERSITY) 205 else if (active_ant->rx == ANTENNA_SW_DIVERSITY)
210 flags |= CONFIG_UPDATE_ANTENNA; 206 flags |= CONFIG_UPDATE_ANTENNA;
211 207
212 if (!conf->antenna_sel_tx && 208 if (default_ant->tx != ANTENNA_SW_DIVERSITY &&
213 default_ant->tx != ANTENNA_SW_DIVERSITY &&
214 default_ant->tx != active_ant->tx) 209 default_ant->tx != active_ant->tx)
215 flags |= CONFIG_UPDATE_ANTENNA; 210 flags |= CONFIG_UPDATE_ANTENNA;
216 else if (conf->antenna_sel_tx &&
217 conf->antenna_sel_tx != active_ant->tx)
218 flags |= CONFIG_UPDATE_ANTENNA;
219 else if (active_ant->tx == ANTENNA_SW_DIVERSITY) 211 else if (active_ant->tx == ANTENNA_SW_DIVERSITY)
220 flags |= CONFIG_UPDATE_ANTENNA; 212 flags |= CONFIG_UPDATE_ANTENNA;
221 213
@@ -252,18 +244,14 @@ config:
252 } 244 }
253 245
254 if (flags & CONFIG_UPDATE_ANTENNA) { 246 if (flags & CONFIG_UPDATE_ANTENNA) {
255 if (conf->antenna_sel_rx) 247 if (default_ant->rx != ANTENNA_SW_DIVERSITY)
256 libconf.ant.rx = conf->antenna_sel_rx;
257 else if (default_ant->rx != ANTENNA_SW_DIVERSITY)
258 libconf.ant.rx = default_ant->rx; 248 libconf.ant.rx = default_ant->rx;
259 else if (active_ant->rx == ANTENNA_SW_DIVERSITY) 249 else if (active_ant->rx == ANTENNA_SW_DIVERSITY)
260 libconf.ant.rx = ANTENNA_B; 250 libconf.ant.rx = ANTENNA_B;
261 else 251 else
262 libconf.ant.rx = active_ant->rx; 252 libconf.ant.rx = active_ant->rx;
263 253
264 if (conf->antenna_sel_tx) 254 if (default_ant->tx != ANTENNA_SW_DIVERSITY)
265 libconf.ant.tx = conf->antenna_sel_tx;
266 else if (default_ant->tx != ANTENNA_SW_DIVERSITY)
267 libconf.ant.tx = default_ant->tx; 255 libconf.ant.tx = default_ant->tx;
268 else if (active_ant->tx == ANTENNA_SW_DIVERSITY) 256 else if (active_ant->tx == ANTENNA_SW_DIVERSITY)
269 libconf.ant.tx = ANTENNA_B; 257 libconf.ant.tx = ANTENNA_B;