aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2007-07-27 09:43:24 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:47:38 -0400
commit7e9ed18874f0df84b6651f0636e1cfdac43bc610 (patch)
tree7bac6083031a48e488c0de5bf71e7f9398e0e011 /drivers
parentd5d08def9216c445339c5a24a2cdc9cc2c8c13f7 (diff)
[MAC80211]: improved short preamble handling
Similarly to CTS protection, whether short preambles are used for 802.11b transmissions should be a per-subif setting, not device global. For STAs, this patch makes short preamble handling automatic based on the ERP IE. For APs, hostapd still uses the prism ioctls, but the write ioctl has been restricted to AP-only subifs. ieee80211_txrx_data.short_preamble (an unused field) was removed. Unfortunately, some API changes were required for the following functions: - ieee80211_generic_frame_duration - ieee80211_rts_duration - ieee80211_ctstoself_duration - ieee80211_rts_get - ieee80211_ctstoself_get Affected drivers were updated accordingly. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: Jiri Benc <jbenc@suse.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rtl8187.h1
-rw-r--r--drivers/net/wireless/rtl8187_dev.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtl8187.h b/drivers/net/wireless/rtl8187.h
index 6124e467b156..7993b3d87203 100644
--- a/drivers/net/wireless/rtl8187.h
+++ b/drivers/net/wireless/rtl8187.h
@@ -67,6 +67,7 @@ struct rtl8187_priv {
67 struct rtl818x_csr *map; 67 struct rtl818x_csr *map;
68 void (*rf_init)(struct ieee80211_hw *); 68 void (*rf_init)(struct ieee80211_hw *);
69 int mode; 69 int mode;
70 int if_id;
70 71
71 /* rtl8187 specific */ 72 /* rtl8187 specific */
72 struct ieee80211_channel channels[14]; 73 struct ieee80211_channel channels[14];
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index e61c6d5ba1a9..73f1ebc7eec7 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -96,7 +96,7 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
96 if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) { 96 if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) {
97 tmp |= RTL8187_TX_FLAG_RTS; 97 tmp |= RTL8187_TX_FLAG_RTS;
98 hdr->rts_duration = 98 hdr->rts_duration =
99 ieee80211_rts_duration(dev, skb->len, control); 99 ieee80211_rts_duration(dev, priv->if_id, skb->len, control);
100 } 100 }
101 if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) 101 if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT)
102 tmp |= RTL8187_TX_FLAG_CTS; 102 tmp |= RTL8187_TX_FLAG_CTS;
@@ -510,6 +510,8 @@ static int rtl8187_config_interface(struct ieee80211_hw *dev, int if_id,
510 struct rtl8187_priv *priv = dev->priv; 510 struct rtl8187_priv *priv = dev->priv;
511 int i; 511 int i;
512 512
513 priv->if_id = if_id;
514
513 for (i = 0; i < ETH_ALEN; i++) 515 for (i = 0; i < ETH_ALEN; i++)
514 rtl818x_iowrite8(priv, &priv->map->BSSID[i], conf->bssid[i]); 516 rtl818x_iowrite8(priv, &priv->map->BSSID[i], conf->bssid[i]);
515 517