diff options
author | Kiran Divekar <dkiran@marvell.com> | 2010-06-14 12:31:26 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-23 15:13:11 -0400 |
commit | e86dc1ca4676445d9f0dfe35104efe0eb8a2f566 (patch) | |
tree | bd39d0d4403899fb438a2e983e1b97c1ccd9b1ad /drivers/net/wireless/libertas/tx.c | |
parent | f90754c15f47063671aea55268a9dd6a37b51492 (diff) |
Libertas: cfg80211 support
Holger Schurig's patch (https://patchwork.kernel.org/patch/64286/)
is rebased to latest wireless-testing tree.
(Includes patches from me originally posted as "libertas: fix build
error due to undefined symbol" and "libertas: unmangle capability
value". -- JWL)
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Tested-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/tx.c')
-rw-r--r-- | drivers/net/wireless/libertas/tx.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c index a9bf658659e..411a3bbf035 100644 --- a/drivers/net/wireless/libertas/tx.c +++ b/drivers/net/wireless/libertas/tx.c | |||
@@ -4,13 +4,13 @@ | |||
4 | #include <linux/netdevice.h> | 4 | #include <linux/netdevice.h> |
5 | #include <linux/etherdevice.h> | 5 | #include <linux/etherdevice.h> |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <net/cfg80211.h> | ||
7 | 8 | ||
8 | #include "host.h" | 9 | #include "host.h" |
9 | #include "radiotap.h" | 10 | #include "radiotap.h" |
10 | #include "decl.h" | 11 | #include "decl.h" |
11 | #include "defs.h" | 12 | #include "defs.h" |
12 | #include "dev.h" | 13 | #include "dev.h" |
13 | #include "wext.h" | ||
14 | 14 | ||
15 | /** | 15 | /** |
16 | * @brief This function converts Tx/Rx rates from IEEE80211_RADIOTAP_RATE | 16 | * @brief This function converts Tx/Rx rates from IEEE80211_RADIOTAP_RATE |
@@ -111,7 +111,7 @@ netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
111 | p802x_hdr = skb->data; | 111 | p802x_hdr = skb->data; |
112 | pkt_len = skb->len; | 112 | pkt_len = skb->len; |
113 | 113 | ||
114 | if (dev == priv->rtap_net_dev) { | 114 | if (priv->wdev->iftype == NL80211_IFTYPE_MONITOR) { |
115 | struct tx_radiotap_hdr *rtap_hdr = (void *)skb->data; | 115 | struct tx_radiotap_hdr *rtap_hdr = (void *)skb->data; |
116 | 116 | ||
117 | /* set txpd fields from the radiotap header */ | 117 | /* set txpd fields from the radiotap header */ |
@@ -147,7 +147,7 @@ netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
147 | dev->stats.tx_packets++; | 147 | dev->stats.tx_packets++; |
148 | dev->stats.tx_bytes += skb->len; | 148 | dev->stats.tx_bytes += skb->len; |
149 | 149 | ||
150 | if (priv->monitormode) { | 150 | if (priv->wdev->iftype == NL80211_IFTYPE_MONITOR) { |
151 | /* Keep the skb to echo it back once Tx feedback is | 151 | /* Keep the skb to echo it back once Tx feedback is |
152 | received from FW */ | 152 | received from FW */ |
153 | skb_orphan(skb); | 153 | skb_orphan(skb); |
@@ -158,6 +158,7 @@ netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
158 | free: | 158 | free: |
159 | dev_kfree_skb_any(skb); | 159 | dev_kfree_skb_any(skb); |
160 | } | 160 | } |
161 | |||
161 | unlock: | 162 | unlock: |
162 | spin_unlock_irqrestore(&priv->driver_lock, flags); | 163 | spin_unlock_irqrestore(&priv->driver_lock, flags); |
163 | wake_up(&priv->waitq); | 164 | wake_up(&priv->waitq); |
@@ -179,7 +180,8 @@ void lbs_send_tx_feedback(struct lbs_private *priv, u32 try_count) | |||
179 | { | 180 | { |
180 | struct tx_radiotap_hdr *radiotap_hdr; | 181 | struct tx_radiotap_hdr *radiotap_hdr; |
181 | 182 | ||
182 | if (!priv->monitormode || priv->currenttxskb == NULL) | 183 | if (!priv->wdev->iftype == NL80211_IFTYPE_MONITOR || |
184 | priv->currenttxskb == NULL) | ||
183 | return; | 185 | return; |
184 | 186 | ||
185 | radiotap_hdr = (struct tx_radiotap_hdr *)priv->currenttxskb->data; | 187 | radiotap_hdr = (struct tx_radiotap_hdr *)priv->currenttxskb->data; |
@@ -188,7 +190,7 @@ void lbs_send_tx_feedback(struct lbs_private *priv, u32 try_count) | |||
188 | (1 + priv->txretrycount - try_count) : 0; | 190 | (1 + priv->txretrycount - try_count) : 0; |
189 | 191 | ||
190 | priv->currenttxskb->protocol = eth_type_trans(priv->currenttxskb, | 192 | priv->currenttxskb->protocol = eth_type_trans(priv->currenttxskb, |
191 | priv->rtap_net_dev); | 193 | priv->dev); |
192 | netif_rx(priv->currenttxskb); | 194 | netif_rx(priv->currenttxskb); |
193 | 195 | ||
194 | priv->currenttxskb = NULL; | 196 | priv->currenttxskb = NULL; |