diff options
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index e428645352b4..3622d76de1e1 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -1368,18 +1368,18 @@ static void b43_write_beacon_template(struct b43_wldev *dev, | |||
1368 | unsigned int rate; | 1368 | unsigned int rate; |
1369 | u16 ctl; | 1369 | u16 ctl; |
1370 | int antenna; | 1370 | int antenna; |
1371 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(dev->wl->current_beacon); | ||
1371 | 1372 | ||
1372 | bcn = (const struct ieee80211_mgmt *)(dev->wl->current_beacon->data); | 1373 | bcn = (const struct ieee80211_mgmt *)(dev->wl->current_beacon->data); |
1373 | len = min((size_t) dev->wl->current_beacon->len, | 1374 | len = min((size_t) dev->wl->current_beacon->len, |
1374 | 0x200 - sizeof(struct b43_plcp_hdr6)); | 1375 | 0x200 - sizeof(struct b43_plcp_hdr6)); |
1375 | rate = ieee80211_get_tx_rate(dev->wl->hw, &dev->wl->beacon_txctl)->hw_value; | 1376 | rate = ieee80211_get_tx_rate(dev->wl->hw, info)->hw_value; |
1376 | 1377 | ||
1377 | b43_write_template_common(dev, (const u8 *)bcn, | 1378 | b43_write_template_common(dev, (const u8 *)bcn, |
1378 | len, ram_offset, shm_size_offset, rate); | 1379 | len, ram_offset, shm_size_offset, rate); |
1379 | 1380 | ||
1380 | /* Write the PHY TX control parameters. */ | 1381 | /* Write the PHY TX control parameters. */ |
1381 | antenna = b43_antenna_from_ieee80211(dev, | 1382 | antenna = b43_antenna_from_ieee80211(dev, info->antenna_sel_tx); |
1382 | dev->wl->beacon_txctl.antenna_sel_tx); | ||
1383 | antenna = b43_antenna_to_phyctl(antenna); | 1383 | antenna = b43_antenna_to_phyctl(antenna); |
1384 | ctl = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL); | 1384 | ctl = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL); |
1385 | /* We can't send beacons with short preamble. Would get PHY errors. */ | 1385 | /* We can't send beacons with short preamble. Would get PHY errors. */ |
@@ -1613,8 +1613,7 @@ static void b43_beacon_update_trigger_work(struct work_struct *work) | |||
1613 | 1613 | ||
1614 | /* Asynchronously update the packet templates in template RAM. | 1614 | /* Asynchronously update the packet templates in template RAM. |
1615 | * Locking: Requires wl->irq_lock to be locked. */ | 1615 | * Locking: Requires wl->irq_lock to be locked. */ |
1616 | static void b43_update_templates(struct b43_wl *wl, struct sk_buff *beacon, | 1616 | static void b43_update_templates(struct b43_wl *wl, struct sk_buff *beacon) |
1617 | const struct ieee80211_tx_control *txctl) | ||
1618 | { | 1617 | { |
1619 | /* This is the top half of the ansynchronous beacon update. | 1618 | /* This is the top half of the ansynchronous beacon update. |
1620 | * The bottom half is the beacon IRQ. | 1619 | * The bottom half is the beacon IRQ. |
@@ -1625,7 +1624,6 @@ static void b43_update_templates(struct b43_wl *wl, struct sk_buff *beacon, | |||
1625 | if (wl->current_beacon) | 1624 | if (wl->current_beacon) |
1626 | dev_kfree_skb_any(wl->current_beacon); | 1625 | dev_kfree_skb_any(wl->current_beacon); |
1627 | wl->current_beacon = beacon; | 1626 | wl->current_beacon = beacon; |
1628 | memcpy(&wl->beacon_txctl, txctl, sizeof(wl->beacon_txctl)); | ||
1629 | wl->beacon0_uploaded = 0; | 1627 | wl->beacon0_uploaded = 0; |
1630 | wl->beacon1_uploaded = 0; | 1628 | wl->beacon1_uploaded = 0; |
1631 | queue_work(wl->hw->workqueue, &wl->beacon_update_trigger); | 1629 | queue_work(wl->hw->workqueue, &wl->beacon_update_trigger); |
@@ -2813,8 +2811,7 @@ static int b43_rng_init(struct b43_wl *wl) | |||
2813 | } | 2811 | } |
2814 | 2812 | ||
2815 | static int b43_op_tx(struct ieee80211_hw *hw, | 2813 | static int b43_op_tx(struct ieee80211_hw *hw, |
2816 | struct sk_buff *skb, | 2814 | struct sk_buff *skb) |
2817 | struct ieee80211_tx_control *ctl) | ||
2818 | { | 2815 | { |
2819 | struct b43_wl *wl = hw_to_b43_wl(hw); | 2816 | struct b43_wl *wl = hw_to_b43_wl(hw); |
2820 | struct b43_wldev *dev = wl->current_dev; | 2817 | struct b43_wldev *dev = wl->current_dev; |
@@ -2836,9 +2833,9 @@ static int b43_op_tx(struct ieee80211_hw *hw, | |||
2836 | err = -ENODEV; | 2833 | err = -ENODEV; |
2837 | if (likely(b43_status(dev) >= B43_STAT_STARTED)) { | 2834 | if (likely(b43_status(dev) >= B43_STAT_STARTED)) { |
2838 | if (b43_using_pio_transfers(dev)) | 2835 | if (b43_using_pio_transfers(dev)) |
2839 | err = b43_pio_tx(dev, skb, ctl); | 2836 | err = b43_pio_tx(dev, skb); |
2840 | else | 2837 | else |
2841 | err = b43_dma_tx(dev, skb, ctl); | 2838 | err = b43_dma_tx(dev, skb); |
2842 | } | 2839 | } |
2843 | 2840 | ||
2844 | read_unlock_irqrestore(&wl->tx_lock, flags); | 2841 | read_unlock_irqrestore(&wl->tx_lock, flags); |
@@ -3429,10 +3426,8 @@ static int b43_op_config_interface(struct ieee80211_hw *hw, | |||
3429 | if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP)) { | 3426 | if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP)) { |
3430 | B43_WARN_ON(conf->type != IEEE80211_IF_TYPE_AP); | 3427 | B43_WARN_ON(conf->type != IEEE80211_IF_TYPE_AP); |
3431 | b43_set_ssid(dev, conf->ssid, conf->ssid_len); | 3428 | b43_set_ssid(dev, conf->ssid, conf->ssid_len); |
3432 | if (conf->beacon) { | 3429 | if (conf->beacon) |
3433 | b43_update_templates(wl, conf->beacon, | 3430 | b43_update_templates(wl, conf->beacon); |
3434 | conf->beacon_control); | ||
3435 | } | ||
3436 | } | 3431 | } |
3437 | b43_write_mac_bssid_templates(dev); | 3432 | b43_write_mac_bssid_templates(dev); |
3438 | } | 3433 | } |
@@ -4118,31 +4113,29 @@ static int b43_op_beacon_set_tim(struct ieee80211_hw *hw, int aid, int set) | |||
4118 | struct b43_wl *wl = hw_to_b43_wl(hw); | 4113 | struct b43_wl *wl = hw_to_b43_wl(hw); |
4119 | struct sk_buff *beacon; | 4114 | struct sk_buff *beacon; |
4120 | unsigned long flags; | 4115 | unsigned long flags; |
4121 | struct ieee80211_tx_control txctl; | ||
4122 | 4116 | ||
4123 | /* We could modify the existing beacon and set the aid bit in | 4117 | /* We could modify the existing beacon and set the aid bit in |
4124 | * the TIM field, but that would probably require resizing and | 4118 | * the TIM field, but that would probably require resizing and |
4125 | * moving of data within the beacon template. | 4119 | * moving of data within the beacon template. |
4126 | * Simply request a new beacon and let mac80211 do the hard work. */ | 4120 | * Simply request a new beacon and let mac80211 do the hard work. */ |
4127 | beacon = ieee80211_beacon_get(hw, wl->vif, &txctl); | 4121 | beacon = ieee80211_beacon_get(hw, wl->vif); |
4128 | if (unlikely(!beacon)) | 4122 | if (unlikely(!beacon)) |
4129 | return -ENOMEM; | 4123 | return -ENOMEM; |
4130 | spin_lock_irqsave(&wl->irq_lock, flags); | 4124 | spin_lock_irqsave(&wl->irq_lock, flags); |
4131 | b43_update_templates(wl, beacon, &txctl); | 4125 | b43_update_templates(wl, beacon); |
4132 | spin_unlock_irqrestore(&wl->irq_lock, flags); | 4126 | spin_unlock_irqrestore(&wl->irq_lock, flags); |
4133 | 4127 | ||
4134 | return 0; | 4128 | return 0; |
4135 | } | 4129 | } |
4136 | 4130 | ||
4137 | static int b43_op_ibss_beacon_update(struct ieee80211_hw *hw, | 4131 | static int b43_op_ibss_beacon_update(struct ieee80211_hw *hw, |
4138 | struct sk_buff *beacon, | 4132 | struct sk_buff *beacon) |
4139 | struct ieee80211_tx_control *ctl) | ||
4140 | { | 4133 | { |
4141 | struct b43_wl *wl = hw_to_b43_wl(hw); | 4134 | struct b43_wl *wl = hw_to_b43_wl(hw); |
4142 | unsigned long flags; | 4135 | unsigned long flags; |
4143 | 4136 | ||
4144 | spin_lock_irqsave(&wl->irq_lock, flags); | 4137 | spin_lock_irqsave(&wl->irq_lock, flags); |
4145 | b43_update_templates(wl, beacon, ctl); | 4138 | b43_update_templates(wl, beacon); |
4146 | spin_unlock_irqrestore(&wl->irq_lock, flags); | 4139 | spin_unlock_irqrestore(&wl->irq_lock, flags); |
4147 | 4140 | ||
4148 | return 0; | 4141 | return 0; |