aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-10-05 12:04:24 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-06 18:14:57 -0400
commit870abdf67170daa9f1022e55a35c469239fcc74c (patch)
tree5ca00db880d71149eea2cdaeb67ed20f5281071d /drivers/net
parent76708dee382a69b2f9d0e50f413f99fefb2dc509 (diff)
mac80211: add multi-rate retry support
This patch adjusts the rate control API to allow multi-rate retry if supported by the driver. The ieee80211_hw struct specifies how many alternate rate selections the driver supports. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/b43/main.c1
-rw-r--r--drivers/net/wireless/b43/xmit.c2
-rw-r--r--drivers/net/wireless/b43legacy/main.c1
-rw-r--r--drivers/net/wireless/b43legacy/xmit.c2
-rw-r--r--drivers/net/wireless/rtl8180_dev.c5
5 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 3bf74e236abc..14c44df584d0 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4588,6 +4588,7 @@ static int b43_wireless_init(struct ssb_device *dev)
4588 BIT(NL80211_IFTYPE_ADHOC); 4588 BIT(NL80211_IFTYPE_ADHOC);
4589 4589
4590 hw->queues = b43_modparam_qos ? 4 : 1; 4590 hw->queues = b43_modparam_qos ? 4 : 1;
4591 hw->max_altrates = 1;
4591 SET_IEEE80211_DEV(hw, dev->dev); 4592 SET_IEEE80211_DEV(hw, dev->dev);
4592 if (is_valid_ether_addr(sprom->et1mac)) 4593 if (is_valid_ether_addr(sprom->et1mac))
4593 SET_IEEE80211_PERM_ADDR(hw, sprom->et1mac); 4594 SET_IEEE80211_PERM_ADDR(hw, sprom->et1mac);
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index e0749c0074cc..2fabcf8f0474 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -208,7 +208,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
208 txrate = ieee80211_get_tx_rate(dev->wl->hw, info); 208 txrate = ieee80211_get_tx_rate(dev->wl->hw, info);
209 rate = txrate ? txrate->hw_value : B43_CCK_RATE_1MB; 209 rate = txrate ? txrate->hw_value : B43_CCK_RATE_1MB;
210 rate_ofdm = b43_is_ofdm_rate(rate); 210 rate_ofdm = b43_is_ofdm_rate(rate);
211 fbrate = ieee80211_get_alt_retry_rate(dev->wl->hw, info) ? : txrate; 211 fbrate = ieee80211_get_alt_retry_rate(dev->wl->hw, info, 0) ? : txrate;
212 rate_fb = fbrate->hw_value; 212 rate_fb = fbrate->hw_value;
213 rate_fb_ofdm = b43_is_ofdm_rate(rate_fb); 213 rate_fb_ofdm = b43_is_ofdm_rate(rate_fb);
214 214
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 9fb1421cbec2..c66d57560e7c 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -3710,6 +3710,7 @@ static int b43legacy_wireless_init(struct ssb_device *dev)
3710 BIT(NL80211_IFTYPE_WDS) | 3710 BIT(NL80211_IFTYPE_WDS) |
3711 BIT(NL80211_IFTYPE_ADHOC); 3711 BIT(NL80211_IFTYPE_ADHOC);
3712 hw->queues = 1; /* FIXME: hardware has more queues */ 3712 hw->queues = 1; /* FIXME: hardware has more queues */
3713 hw->max_altrates = 1;
3713 SET_IEEE80211_DEV(hw, dev->dev); 3714 SET_IEEE80211_DEV(hw, dev->dev);
3714 if (is_valid_ether_addr(sprom->et1mac)) 3715 if (is_valid_ether_addr(sprom->et1mac))
3715 SET_IEEE80211_PERM_ADDR(hw, sprom->et1mac); 3716 SET_IEEE80211_PERM_ADDR(hw, sprom->et1mac);
diff --git a/drivers/net/wireless/b43legacy/xmit.c b/drivers/net/wireless/b43legacy/xmit.c
index a894169411c5..65e833781608 100644
--- a/drivers/net/wireless/b43legacy/xmit.c
+++ b/drivers/net/wireless/b43legacy/xmit.c
@@ -210,7 +210,7 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev,
210 210
211 rate = tx_rate->hw_value; 211 rate = tx_rate->hw_value;
212 rate_ofdm = b43legacy_is_ofdm_rate(rate); 212 rate_ofdm = b43legacy_is_ofdm_rate(rate);
213 rate_fb = ieee80211_get_alt_retry_rate(dev->wl->hw, info) ? : tx_rate; 213 rate_fb = ieee80211_get_alt_retry_rate(dev->wl->hw, info, 0) ? : tx_rate;
214 rate_fb_ofdm = b43legacy_is_ofdm_rate(rate_fb->hw_value); 214 rate_fb_ofdm = b43legacy_is_ofdm_rate(rate_fb->hw_value);
215 215
216 txhdr->mac_frame_ctl = wlhdr->frame_control; 216 txhdr->mac_frame_ctl = wlhdr->frame_control;
diff --git a/drivers/net/wireless/rtl8180_dev.c b/drivers/net/wireless/rtl8180_dev.c
index abcd641c54be..df7e78ee8a88 100644
--- a/drivers/net/wireless/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl8180_dev.c
@@ -292,8 +292,8 @@ static int rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
292 entry->plcp_len = cpu_to_le16(plcp_len); 292 entry->plcp_len = cpu_to_le16(plcp_len);
293 entry->tx_buf = cpu_to_le32(mapping); 293 entry->tx_buf = cpu_to_le32(mapping);
294 entry->frame_len = cpu_to_le32(skb->len); 294 entry->frame_len = cpu_to_le32(skb->len);
295 entry->flags2 = info->control.alt_retry_rate_idx >= 0 ? 295 entry->flags2 = info->control.retries[0].rate_idx >= 0 ?
296 ieee80211_get_alt_retry_rate(dev, info)->bitrate << 4 : 0; 296 ieee80211_get_alt_retry_rate(dev, info, 0)->bitrate << 4 : 0;
297 entry->retry_limit = info->control.retry_limit; 297 entry->retry_limit = info->control.retry_limit;
298 entry->flags = cpu_to_le32(tx_flags); 298 entry->flags = cpu_to_le32(tx_flags);
299 __skb_queue_tail(&ring->queue, skb); 299 __skb_queue_tail(&ring->queue, skb);
@@ -855,6 +855,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
855 priv = dev->priv; 855 priv = dev->priv;
856 priv->pdev = pdev; 856 priv->pdev = pdev;
857 857
858 dev->max_altrates = 1;
858 SET_IEEE80211_DEV(dev, &pdev->dev); 859 SET_IEEE80211_DEV(dev, &pdev->dev);
859 pci_set_drvdata(pdev, dev); 860 pci_set_drvdata(pdev, dev);
860 861