diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-05-24 17:17:11 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-05-24 17:17:11 -0400 |
commit | c71cd01989b417317f4d22ccf4ce112859671b64 (patch) | |
tree | 5447a67ba5ed686277db7dd3c95cadc2fb305090 /drivers/net | |
parent | efa5bf1dd2cf3cdee0bfe97cfd76ff2296179ae4 (diff) | |
parent | 412e8a0ebf1a58c060cc76438e5b6d33789c5e20 (diff) |
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/libertas/decl.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/fw.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/rx.c | 24 |
3 files changed, 15 insertions, 25 deletions
diff --git a/drivers/net/wireless/libertas/decl.h b/drivers/net/wireless/libertas/decl.h index 606bdd002be7..dfe27642322c 100644 --- a/drivers/net/wireless/libertas/decl.h +++ b/drivers/net/wireless/libertas/decl.h | |||
@@ -46,7 +46,7 @@ u32 libertas_index_to_data_rate(u8 index); | |||
46 | u8 libertas_data_rate_to_index(u32 rate); | 46 | u8 libertas_data_rate_to_index(u32 rate); |
47 | void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen); | 47 | void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen); |
48 | 48 | ||
49 | int libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb); | 49 | void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb); |
50 | 50 | ||
51 | /** The proc fs interface */ | 51 | /** The proc fs interface */ |
52 | int libertas_process_rx_command(wlan_private * priv); | 52 | int libertas_process_rx_command(wlan_private * priv); |
diff --git a/drivers/net/wireless/libertas/fw.c b/drivers/net/wireless/libertas/fw.c index 441123c85e62..5c63c9b1659c 100644 --- a/drivers/net/wireless/libertas/fw.c +++ b/drivers/net/wireless/libertas/fw.c | |||
@@ -333,18 +333,22 @@ static void command_timer_fn(unsigned long data) | |||
333 | unsigned long flags; | 333 | unsigned long flags; |
334 | 334 | ||
335 | ptempnode = adapter->cur_cmd; | 335 | ptempnode = adapter->cur_cmd; |
336 | if (ptempnode == NULL) { | ||
337 | lbs_pr_debug(1, "PTempnode Empty\n"); | ||
338 | return; | ||
339 | } | ||
340 | |||
336 | cmd = (struct cmd_ds_command *)ptempnode->bufvirtualaddr; | 341 | cmd = (struct cmd_ds_command *)ptempnode->bufvirtualaddr; |
342 | if (!cmd) { | ||
343 | lbs_pr_debug(1, "cmd is NULL\n"); | ||
344 | return; | ||
345 | } | ||
337 | 346 | ||
338 | lbs_pr_info("command_timer_fn fired (%x)\n", cmd->command); | 347 | lbs_pr_info("command_timer_fn fired (%x)\n", cmd->command); |
339 | 348 | ||
340 | if (!adapter->fw_ready) | 349 | if (!adapter->fw_ready) |
341 | return; | 350 | return; |
342 | 351 | ||
343 | if (ptempnode == NULL) { | ||
344 | lbs_pr_debug(1, "PTempnode Empty\n"); | ||
345 | return; | ||
346 | } | ||
347 | |||
348 | spin_lock_irqsave(&adapter->driver_lock, flags); | 352 | spin_lock_irqsave(&adapter->driver_lock, flags); |
349 | adapter->cur_cmd = NULL; | 353 | adapter->cur_cmd = NULL; |
350 | spin_unlock_irqrestore(&adapter->driver_lock, flags); | 354 | spin_unlock_irqrestore(&adapter->driver_lock, flags); |
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c index d17924f764e5..96619a32951b 100644 --- a/drivers/net/wireless/libertas/rx.c +++ b/drivers/net/wireless/libertas/rx.c | |||
@@ -136,7 +136,7 @@ static void wlan_compute_rssi(wlan_private * priv, struct rxpd *p_rx_pd) | |||
136 | LEAVE(); | 136 | LEAVE(); |
137 | } | 137 | } |
138 | 138 | ||
139 | int libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb) | 139 | void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb) |
140 | { | 140 | { |
141 | lbs_pr_debug(1, "skb->data=%p\n", skb->data); | 141 | lbs_pr_debug(1, "skb->data=%p\n", skb->data); |
142 | 142 | ||
@@ -148,8 +148,6 @@ int libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb) | |||
148 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 148 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
149 | 149 | ||
150 | netif_rx(skb); | 150 | netif_rx(skb); |
151 | |||
152 | return 0; | ||
153 | } | 151 | } |
154 | 152 | ||
155 | /** | 153 | /** |
@@ -269,15 +267,11 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb) | |||
269 | wlan_compute_rssi(priv, p_rx_pd); | 267 | wlan_compute_rssi(priv, p_rx_pd); |
270 | 268 | ||
271 | lbs_pr_debug(1, "RX Data: size of actual packet = %d\n", skb->len); | 269 | lbs_pr_debug(1, "RX Data: size of actual packet = %d\n", skb->len); |
272 | if (libertas_upload_rx_packet(priv, skb)) { | ||
273 | lbs_pr_debug(1, "RX error: libertas_upload_rx_packet" | ||
274 | " returns failure\n"); | ||
275 | ret = -1; | ||
276 | goto done; | ||
277 | } | ||
278 | priv->stats.rx_bytes += skb->len; | 270 | priv->stats.rx_bytes += skb->len; |
279 | priv->stats.rx_packets++; | 271 | priv->stats.rx_packets++; |
280 | 272 | ||
273 | libertas_upload_rx_packet(priv, skb); | ||
274 | |||
281 | ret = 0; | 275 | ret = 0; |
282 | done: | 276 | done: |
283 | LEAVE(); | 277 | LEAVE(); |
@@ -438,22 +432,14 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb) | |||
438 | wlan_compute_rssi(priv, prxpd); | 432 | wlan_compute_rssi(priv, prxpd); |
439 | 433 | ||
440 | lbs_pr_debug(1, "RX Data: size of actual packet = %d\n", skb->len); | 434 | lbs_pr_debug(1, "RX Data: size of actual packet = %d\n", skb->len); |
441 | |||
442 | if (libertas_upload_rx_packet(priv, skb)) { | ||
443 | lbs_pr_debug(1, "RX error: libertas_upload_rx_packet " | ||
444 | "returns failure\n"); | ||
445 | ret = -1; | ||
446 | goto done; | ||
447 | } | ||
448 | |||
449 | priv->stats.rx_bytes += skb->len; | 435 | priv->stats.rx_bytes += skb->len; |
450 | priv->stats.rx_packets++; | 436 | priv->stats.rx_packets++; |
451 | 437 | ||
438 | libertas_upload_rx_packet(priv, skb); | ||
439 | |||
452 | ret = 0; | 440 | ret = 0; |
453 | done: | 441 | done: |
454 | LEAVE(); | 442 | LEAVE(); |
455 | 443 | ||
456 | skb->protocol = __constant_htons(0x0019); /* ETH_P_80211_RAW */ | ||
457 | |||
458 | return (ret); | 444 | return (ret); |
459 | } | 445 | } |