diff options
-rw-r--r-- | drivers/net/wireless/b43/main.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/b43legacy/main.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00config.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 6 | ||||
-rw-r--r-- | include/net/mac80211.h | 7 | ||||
-rw-r--r-- | net/mac80211/debugfs.c | 8 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/tx.c | 1 |
9 files changed, 13 insertions, 77 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 6e773018cba0..6b85428b0e1d 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -1339,25 +1339,6 @@ u8 b43_ieee80211_antenna_sanitize(struct b43_wldev *dev, | |||
1339 | return antenna_nr; | 1339 | return antenna_nr; |
1340 | } | 1340 | } |
1341 | 1341 | ||
1342 | static int b43_antenna_from_ieee80211(struct b43_wldev *dev, u8 antenna) | ||
1343 | { | ||
1344 | antenna = b43_ieee80211_antenna_sanitize(dev, antenna); | ||
1345 | switch (antenna) { | ||
1346 | case 0: /* default/diversity */ | ||
1347 | return B43_ANTENNA_DEFAULT; | ||
1348 | case 1: /* Antenna 0 */ | ||
1349 | return B43_ANTENNA0; | ||
1350 | case 2: /* Antenna 1 */ | ||
1351 | return B43_ANTENNA1; | ||
1352 | case 3: /* Antenna 2 */ | ||
1353 | return B43_ANTENNA2; | ||
1354 | case 4: /* Antenna 3 */ | ||
1355 | return B43_ANTENNA3; | ||
1356 | default: | ||
1357 | return B43_ANTENNA_DEFAULT; | ||
1358 | } | ||
1359 | } | ||
1360 | |||
1361 | /* Convert a b43 antenna number value to the PHY TX control value. */ | 1342 | /* Convert a b43 antenna number value to the PHY TX control value. */ |
1362 | static u16 b43_antenna_to_phyctl(int antenna) | 1343 | static u16 b43_antenna_to_phyctl(int antenna) |
1363 | { | 1344 | { |
@@ -1399,7 +1380,7 @@ static void b43_write_beacon_template(struct b43_wldev *dev, | |||
1399 | len, ram_offset, shm_size_offset, rate); | 1380 | len, ram_offset, shm_size_offset, rate); |
1400 | 1381 | ||
1401 | /* Write the PHY TX control parameters. */ | 1382 | /* Write the PHY TX control parameters. */ |
1402 | antenna = b43_antenna_from_ieee80211(dev, info->antenna_sel_tx); | 1383 | antenna = B43_ANTENNA_DEFAULT; |
1403 | antenna = b43_antenna_to_phyctl(antenna); | 1384 | antenna = b43_antenna_to_phyctl(antenna); |
1404 | ctl = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL); | 1385 | ctl = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL); |
1405 | /* We can't send beacons with short preamble. Would get PHY errors. */ | 1386 | /* We can't send beacons with short preamble. Would get PHY errors. */ |
@@ -3399,9 +3380,9 @@ static int b43_op_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf) | |||
3399 | } | 3380 | } |
3400 | 3381 | ||
3401 | /* Antennas for RX and management frame TX. */ | 3382 | /* Antennas for RX and management frame TX. */ |
3402 | antenna = b43_antenna_from_ieee80211(dev, conf->antenna_sel_tx); | 3383 | antenna = B43_ANTENNA_DEFAULT; |
3403 | b43_mgmtframe_txantenna(dev, antenna); | 3384 | b43_mgmtframe_txantenna(dev, antenna); |
3404 | antenna = b43_antenna_from_ieee80211(dev, conf->antenna_sel_rx); | 3385 | antenna = B43_ANTENNA_DEFAULT; |
3405 | if (phy->ops->set_rx_antenna) | 3386 | if (phy->ops->set_rx_antenna) |
3406 | phy->ops->set_rx_antenna(dev, antenna); | 3387 | phy->ops->set_rx_antenna(dev, antenna); |
3407 | 3388 | ||
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index c66d57560e7c..867f01ce45c7 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -2556,20 +2556,6 @@ init_failure: | |||
2556 | return err; | 2556 | return err; |
2557 | } | 2557 | } |
2558 | 2558 | ||
2559 | static int b43legacy_antenna_from_ieee80211(u8 antenna) | ||
2560 | { | ||
2561 | switch (antenna) { | ||
2562 | case 0: /* default/diversity */ | ||
2563 | return B43legacy_ANTENNA_DEFAULT; | ||
2564 | case 1: /* Antenna 0 */ | ||
2565 | return B43legacy_ANTENNA0; | ||
2566 | case 2: /* Antenna 1 */ | ||
2567 | return B43legacy_ANTENNA1; | ||
2568 | default: | ||
2569 | return B43legacy_ANTENNA_DEFAULT; | ||
2570 | } | ||
2571 | } | ||
2572 | |||
2573 | static int b43legacy_op_dev_config(struct ieee80211_hw *hw, | 2559 | static int b43legacy_op_dev_config(struct ieee80211_hw *hw, |
2574 | struct ieee80211_conf *conf) | 2560 | struct ieee80211_conf *conf) |
2575 | { | 2561 | { |
@@ -2583,8 +2569,8 @@ static int b43legacy_op_dev_config(struct ieee80211_hw *hw, | |||
2583 | int err = 0; | 2569 | int err = 0; |
2584 | u32 savedirqs; | 2570 | u32 savedirqs; |
2585 | 2571 | ||
2586 | antenna_tx = b43legacy_antenna_from_ieee80211(conf->antenna_sel_tx); | 2572 | antenna_tx = B43legacy_ANTENNA_DEFAULT; |
2587 | antenna_rx = b43legacy_antenna_from_ieee80211(conf->antenna_sel_rx); | 2573 | antenna_rx = B43legacy_ANTENNA_DEFAULT; |
2588 | 2574 | ||
2589 | mutex_lock(&wl->mutex); | 2575 | mutex_lock(&wl->mutex); |
2590 | dev = wl->current_dev; | 2576 | dev = wl->current_dev; |
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index b1dc10ccd32c..b3e75eb4d5ba 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -1198,8 +1198,7 @@ static int p54_config(struct ieee80211_hw *dev, struct ieee80211_conf *conf) | |||
1198 | struct p54_common *priv = dev->priv; | 1198 | struct p54_common *priv = dev->priv; |
1199 | 1199 | ||
1200 | mutex_lock(&priv->conf_mutex); | 1200 | mutex_lock(&priv->conf_mutex); |
1201 | priv->rx_antenna = (conf->antenna_sel_rx == 0) ? | 1201 | priv->rx_antenna = 2; /* automatic */ |
1202 | 2 : conf->antenna_sel_tx - 1; | ||
1203 | priv->output_power = conf->power_level << 2; | 1202 | priv->output_power = conf->power_level << 2; |
1204 | ret = p54_set_freq(dev, cpu_to_le16(conf->channel->center_freq)); | 1203 | ret = p54_set_freq(dev, cpu_to_le16(conf->channel->center_freq)); |
1205 | p54_set_vdcf(dev); | 1204 | p54_set_vdcf(dev); |
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; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 86840e3585e8..9e0472bd1edf 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -249,11 +249,9 @@ static void rt2x00lib_evaluate_antenna(struct rt2x00_dev *rt2x00dev) | |||
249 | rt2x00dev->link.ant.flags &= ~ANTENNA_RX_DIVERSITY; | 249 | rt2x00dev->link.ant.flags &= ~ANTENNA_RX_DIVERSITY; |
250 | rt2x00dev->link.ant.flags &= ~ANTENNA_TX_DIVERSITY; | 250 | rt2x00dev->link.ant.flags &= ~ANTENNA_TX_DIVERSITY; |
251 | 251 | ||
252 | if (rt2x00dev->hw->conf.antenna_sel_rx == 0 && | 252 | if (rt2x00dev->default_ant.rx == ANTENNA_SW_DIVERSITY) |
253 | rt2x00dev->default_ant.rx == ANTENNA_SW_DIVERSITY) | ||
254 | rt2x00dev->link.ant.flags |= ANTENNA_RX_DIVERSITY; | 253 | rt2x00dev->link.ant.flags |= ANTENNA_RX_DIVERSITY; |
255 | if (rt2x00dev->hw->conf.antenna_sel_tx == 0 && | 254 | if (rt2x00dev->default_ant.tx == ANTENNA_SW_DIVERSITY) |
256 | rt2x00dev->default_ant.tx == ANTENNA_SW_DIVERSITY) | ||
257 | rt2x00dev->link.ant.flags |= ANTENNA_TX_DIVERSITY; | 255 | rt2x00dev->link.ant.flags |= ANTENNA_TX_DIVERSITY; |
258 | 256 | ||
259 | if (!(rt2x00dev->link.ant.flags & ANTENNA_RX_DIVERSITY) && | 257 | if (!(rt2x00dev->link.ant.flags & ANTENNA_RX_DIVERSITY) && |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 2870f3973f1a..5f28b7f89887 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -324,7 +324,7 @@ struct ieee80211_tx_altrate { | |||
324 | * @flags: transmit info flags, defined above | 324 | * @flags: transmit info flags, defined above |
325 | * @band: TBD | 325 | * @band: TBD |
326 | * @tx_rate_idx: TBD | 326 | * @tx_rate_idx: TBD |
327 | * @antenna_sel_tx: TBD | 327 | * @antenna_sel_tx: antenna to use, 0 for automatic diversity |
328 | * @control: union for control data | 328 | * @control: union for control data |
329 | * @status: union for status data | 329 | * @status: union for status data |
330 | * @driver_data: array of driver_data pointers | 330 | * @driver_data: array of driver_data pointers |
@@ -474,9 +474,6 @@ static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void) | |||
474 | * @listen_interval: listen interval in units of beacon interval | 474 | * @listen_interval: listen interval in units of beacon interval |
475 | * @flags: configuration flags defined above | 475 | * @flags: configuration flags defined above |
476 | * @power_level: requested transmit power (in dBm) | 476 | * @power_level: requested transmit power (in dBm) |
477 | * @antenna_sel_tx: transmit antenna selection, 0: default/diversity, | ||
478 | * 1/2: antenna 0/1 | ||
479 | * @antenna_sel_rx: receive antenna selection, like @antenna_sel_tx | ||
480 | * @ht_cap: describes current self configuration of 802.11n HT capabilities | 477 | * @ht_cap: describes current self configuration of 802.11n HT capabilities |
481 | * @ht_bss_conf: describes current BSS configuration of 802.11n HT parameters | 478 | * @ht_bss_conf: describes current BSS configuration of 802.11n HT parameters |
482 | * @channel: the channel to tune to | 479 | * @channel: the channel to tune to |
@@ -488,8 +485,6 @@ struct ieee80211_conf { | |||
488 | u16 listen_interval; | 485 | u16 listen_interval; |
489 | u32 flags; | 486 | u32 flags; |
490 | int power_level; | 487 | int power_level; |
491 | u8 antenna_sel_tx; | ||
492 | u8 antenna_sel_rx; | ||
493 | 488 | ||
494 | struct ieee80211_channel *channel; | 489 | struct ieee80211_channel *channel; |
495 | 490 | ||
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 24ce54463310..767dbca50adb 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c | |||
@@ -47,10 +47,6 @@ static const struct file_operations name## _ops = { \ | |||
47 | 47 | ||
48 | DEBUGFS_READONLY_FILE(frequency, 20, "%d", | 48 | DEBUGFS_READONLY_FILE(frequency, 20, "%d", |
49 | local->hw.conf.channel->center_freq); | 49 | local->hw.conf.channel->center_freq); |
50 | DEBUGFS_READONLY_FILE(antenna_sel_tx, 20, "%d", | ||
51 | local->hw.conf.antenna_sel_tx); | ||
52 | DEBUGFS_READONLY_FILE(antenna_sel_rx, 20, "%d", | ||
53 | local->hw.conf.antenna_sel_rx); | ||
54 | DEBUGFS_READONLY_FILE(rts_threshold, 20, "%d", | 50 | DEBUGFS_READONLY_FILE(rts_threshold, 20, "%d", |
55 | local->rts_threshold); | 51 | local->rts_threshold); |
56 | DEBUGFS_READONLY_FILE(fragmentation_threshold, 20, "%d", | 52 | DEBUGFS_READONLY_FILE(fragmentation_threshold, 20, "%d", |
@@ -202,8 +198,6 @@ void debugfs_hw_add(struct ieee80211_local *local) | |||
202 | local->debugfs.keys = debugfs_create_dir("keys", phyd); | 198 | local->debugfs.keys = debugfs_create_dir("keys", phyd); |
203 | 199 | ||
204 | DEBUGFS_ADD(frequency); | 200 | DEBUGFS_ADD(frequency); |
205 | DEBUGFS_ADD(antenna_sel_tx); | ||
206 | DEBUGFS_ADD(antenna_sel_rx); | ||
207 | DEBUGFS_ADD(rts_threshold); | 201 | DEBUGFS_ADD(rts_threshold); |
208 | DEBUGFS_ADD(fragmentation_threshold); | 202 | DEBUGFS_ADD(fragmentation_threshold); |
209 | DEBUGFS_ADD(short_retry_limit); | 203 | DEBUGFS_ADD(short_retry_limit); |
@@ -258,8 +252,6 @@ void debugfs_hw_add(struct ieee80211_local *local) | |||
258 | void debugfs_hw_del(struct ieee80211_local *local) | 252 | void debugfs_hw_del(struct ieee80211_local *local) |
259 | { | 253 | { |
260 | DEBUGFS_DEL(frequency); | 254 | DEBUGFS_DEL(frequency); |
261 | DEBUGFS_DEL(antenna_sel_tx); | ||
262 | DEBUGFS_DEL(antenna_sel_rx); | ||
263 | DEBUGFS_DEL(rts_threshold); | 255 | DEBUGFS_DEL(rts_threshold); |
264 | DEBUGFS_DEL(fragmentation_threshold); | 256 | DEBUGFS_DEL(fragmentation_threshold); |
265 | DEBUGFS_DEL(short_retry_limit); | 257 | DEBUGFS_DEL(short_retry_limit); |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index ae4ca3e8b443..88015838a63c 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -727,8 +727,6 @@ struct ieee80211_local { | |||
727 | struct dentry *rcdir; | 727 | struct dentry *rcdir; |
728 | struct dentry *rcname; | 728 | struct dentry *rcname; |
729 | struct dentry *frequency; | 729 | struct dentry *frequency; |
730 | struct dentry *antenna_sel_tx; | ||
731 | struct dentry *antenna_sel_rx; | ||
732 | struct dentry *rts_threshold; | 730 | struct dentry *rts_threshold; |
733 | struct dentry *fragmentation_threshold; | 731 | struct dentry *fragmentation_threshold; |
734 | struct dentry *short_retry_limit; | 732 | struct dentry *short_retry_limit; |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 9191b510bff8..22494bcf488a 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1971,7 +1971,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | |||
1971 | sband->bitrates[rsel.rate_idx].flags & IEEE80211_RATE_SHORT_PREAMBLE) | 1971 | sband->bitrates[rsel.rate_idx].flags & IEEE80211_RATE_SHORT_PREAMBLE) |
1972 | info->flags |= IEEE80211_TX_CTL_SHORT_PREAMBLE; | 1972 | info->flags |= IEEE80211_TX_CTL_SHORT_PREAMBLE; |
1973 | 1973 | ||
1974 | info->antenna_sel_tx = local->hw.conf.antenna_sel_tx; | ||
1975 | info->control.retry_limit = 1; | 1974 | info->control.retry_limit = 1; |
1976 | 1975 | ||
1977 | out: | 1976 | out: |