aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/libertas/decl.h2
-rw-r--r--drivers/net/wireless/libertas/rx.c32
-rw-r--r--drivers/net/wireless/libertas/tx.c8
3 files changed, 16 insertions, 26 deletions
diff --git a/drivers/net/wireless/libertas/decl.h b/drivers/net/wireless/libertas/decl.h
index fcb5a8512903..e8387c7ec02a 100644
--- a/drivers/net/wireless/libertas/decl.h
+++ b/drivers/net/wireless/libertas/decl.h
@@ -46,8 +46,6 @@ void lbs_get_fwversion(struct lbs_private *priv,
46 char *fwversion, 46 char *fwversion,
47 int maxlen); 47 int maxlen);
48 48
49void lbs_upload_rx_packet(struct lbs_private *priv, struct sk_buff *skb);
50
51/** The proc fs interface */ 49/** The proc fs interface */
52int lbs_process_rx_command(struct lbs_private *priv); 50int lbs_process_rx_command(struct lbs_private *priv);
53void __lbs_cleanup_and_insert_cmd(struct lbs_private *priv, 51void __lbs_cleanup_and_insert_cmd(struct lbs_private *priv,
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c
index 141069fa67f2..6332fd451a1e 100644
--- a/drivers/net/wireless/libertas/rx.c
+++ b/drivers/net/wireless/libertas/rx.c
@@ -131,22 +131,6 @@ static void lbs_compute_rssi(struct lbs_private *priv, struct rxpd *p_rx_pd)
131 lbs_deb_leave(LBS_DEB_RX); 131 lbs_deb_leave(LBS_DEB_RX);
132} 132}
133 133
134void lbs_upload_rx_packet(struct lbs_private *priv, struct sk_buff *skb)
135{
136 lbs_deb_rx("skb->data %p\n", skb->data);
137
138 if (priv->monitormode != LBS_MONITOR_OFF) {
139 skb->protocol = eth_type_trans(skb, priv->rtap_net_dev);
140 } else {
141 if (priv->mesh_dev && IS_MESH_FRAME(skb))
142 skb->protocol = eth_type_trans(skb, priv->mesh_dev);
143 else
144 skb->protocol = eth_type_trans(skb, priv->dev);
145 }
146 skb->ip_summed = CHECKSUM_NONE;
147 netif_rx(skb);
148}
149
150/** 134/**
151 * @brief This function processes received packet and forwards it 135 * @brief This function processes received packet and forwards it
152 * to kernel/upper layer 136 * to kernel/upper layer
@@ -158,7 +142,7 @@ void lbs_upload_rx_packet(struct lbs_private *priv, struct sk_buff *skb)
158int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb) 142int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
159{ 143{
160 int ret = 0; 144 int ret = 0;
161 145 struct net_device *dev = priv->dev;
162 struct rxpackethdr *p_rx_pkt; 146 struct rxpackethdr *p_rx_pkt;
163 struct rxpd *p_rx_pd; 147 struct rxpd *p_rx_pd;
164 148
@@ -169,15 +153,15 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
169 153
170 lbs_deb_enter(LBS_DEB_RX); 154 lbs_deb_enter(LBS_DEB_RX);
171 155
156 skb->ip_summed = CHECKSUM_NONE;
157
172 if (priv->monitormode != LBS_MONITOR_OFF) 158 if (priv->monitormode != LBS_MONITOR_OFF)
173 return process_rxed_802_11_packet(priv, skb); 159 return process_rxed_802_11_packet(priv, skb);
174 160
175 p_rx_pkt = (struct rxpackethdr *) skb->data; 161 p_rx_pkt = (struct rxpackethdr *) skb->data;
176 p_rx_pd = &p_rx_pkt->rx_pd; 162 p_rx_pd = &p_rx_pkt->rx_pd;
177 if (p_rx_pd->rx_control & RxPD_MESH_FRAME) 163 if (priv->mesh_dev && (p_rx_pd->rx_control & RxPD_MESH_FRAME))
178 SET_MESH_FRAME(skb); 164 dev = priv->mesh_dev;
179 else
180 UNSET_MESH_FRAME(skb);
181 165
182 lbs_deb_hex(LBS_DEB_RX, "RX Data: Before chop rxpd", skb->data, 166 lbs_deb_hex(LBS_DEB_RX, "RX Data: Before chop rxpd", skb->data,
183 min_t(unsigned int, skb->len, 100)); 167 min_t(unsigned int, skb->len, 100));
@@ -262,7 +246,8 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
262 priv->stats.rx_bytes += skb->len; 246 priv->stats.rx_bytes += skb->len;
263 priv->stats.rx_packets++; 247 priv->stats.rx_packets++;
264 248
265 lbs_upload_rx_packet(priv, skb); 249 skb->protocol = eth_type_trans(skb, dev);
250 netif_rx(skb);
266 251
267 ret = 0; 252 ret = 0;
268done: 253done:
@@ -404,7 +389,8 @@ static int process_rxed_802_11_packet(struct lbs_private *priv,
404 priv->stats.rx_bytes += skb->len; 389 priv->stats.rx_bytes += skb->len;
405 priv->stats.rx_packets++; 390 priv->stats.rx_packets++;
406 391
407 lbs_upload_rx_packet(priv, skb); 392 skb->protocol = eth_type_trans(skb, priv->rtap_net_dev);
393 netif_rx(skb);
408 394
409 ret = 0; 395 ret = 0;
410 396
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c
index e2141f0a67d4..8a1a3965f1c5 100644
--- a/drivers/net/wireless/libertas/tx.c
+++ b/drivers/net/wireless/libertas/tx.c
@@ -2,6 +2,7 @@
2 * This file contains the handling of TX in wlan driver. 2 * This file contains the handling of TX in wlan driver.
3 */ 3 */
4#include <linux/netdevice.h> 4#include <linux/netdevice.h>
5#include <linux/etherdevice.h>
5 6
6#include "hostcmd.h" 7#include "hostcmd.h"
7#include "radiotap.h" 8#include "radiotap.h"
@@ -203,7 +204,12 @@ void lbs_send_tx_feedback(struct lbs_private *priv)
203 try_count = (status >> 16) & 0xff; 204 try_count = (status >> 16) & 0xff;
204 radiotap_hdr->data_retries = (try_count) ? 205 radiotap_hdr->data_retries = (try_count) ?
205 (1 + priv->txretrycount - try_count) : 0; 206 (1 + priv->txretrycount - try_count) : 0;
206 lbs_upload_rx_packet(priv, priv->currenttxskb); 207
208
209 priv->currenttxskb->protocol = eth_type_trans(priv->currenttxskb,
210 priv->rtap_net_dev);
211 netif_rx(priv->currenttxskb);
212
207 priv->currenttxskb = NULL; 213 priv->currenttxskb = NULL;
208 214
209 if (priv->connect_status == LBS_CONNECTED) 215 if (priv->connect_status == LBS_CONNECTED)