diff options
author | Zhu Yi <yi.zhu@intel.com> | 2006-02-21 05:41:14 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-03-17 16:14:48 -0500 |
commit | cae1629515cf6d166fa20657e68b75619d563280 (patch) | |
tree | a40dbc0c8e7d6fed80be63bcc4182ef42b3ca84d /drivers | |
parent | 15745a7dd1ac6bf1ef7959040f864c78a95aa35b (diff) |
[PATCH] ipw2100: Fix radiotap code gcc warning
Fix gcc warning: ipw2100.c:2460: ISO C90 forbids mixed declarations and code
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index d429fd576a66..b0e23a88250f 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -2445,8 +2445,6 @@ static void isr_rx_monitor(struct ipw2100_priv *priv, int i, | |||
2445 | struct ipw2100_status *status = &priv->status_queue.drv[i]; | 2445 | struct ipw2100_status *status = &priv->status_queue.drv[i]; |
2446 | struct ipw2100_rx_packet *packet = &priv->rx_buffers[i]; | 2446 | struct ipw2100_rx_packet *packet = &priv->rx_buffers[i]; |
2447 | 2447 | ||
2448 | IPW_DEBUG_RX("Handler...\n"); | ||
2449 | |||
2450 | /* Magic struct that slots into the radiotap header -- no reason | 2448 | /* Magic struct that slots into the radiotap header -- no reason |
2451 | * to build this manually element by element, we can write it much | 2449 | * to build this manually element by element, we can write it much |
2452 | * more efficiently than we can parse it. ORDER MATTERS HERE */ | 2450 | * more efficiently than we can parse it. ORDER MATTERS HERE */ |
@@ -2455,11 +2453,15 @@ static void isr_rx_monitor(struct ipw2100_priv *priv, int i, | |||
2455 | s8 rt_dbmsignal; /* signal in dbM, kluged to signed */ | 2453 | s8 rt_dbmsignal; /* signal in dbM, kluged to signed */ |
2456 | } *ipw_rt; | 2454 | } *ipw_rt; |
2457 | 2455 | ||
2458 | if (unlikely(status->frame_size > skb_tailroom(packet->skb) - sizeof(struct ipw_rt_hdr))) { | 2456 | IPW_DEBUG_RX("Handler...\n"); |
2457 | |||
2458 | if (unlikely(status->frame_size > skb_tailroom(packet->skb) - | ||
2459 | sizeof(struct ipw_rt_hdr))) { | ||
2459 | IPW_DEBUG_INFO("%s: frame_size (%u) > skb_tailroom (%u)!" | 2460 | IPW_DEBUG_INFO("%s: frame_size (%u) > skb_tailroom (%u)!" |
2460 | " Dropping.\n", | 2461 | " Dropping.\n", |
2461 | priv->net_dev->name, | 2462 | priv->net_dev->name, |
2462 | status->frame_size, skb_tailroom(packet->skb)); | 2463 | status->frame_size, |
2464 | skb_tailroom(packet->skb)); | ||
2463 | priv->ieee->stats.rx_errors++; | 2465 | priv->ieee->stats.rx_errors++; |
2464 | return; | 2466 | return; |
2465 | } | 2467 | } |
@@ -2478,8 +2480,7 @@ static void isr_rx_monitor(struct ipw2100_priv *priv, int i, | |||
2478 | return; | 2480 | return; |
2479 | } | 2481 | } |
2480 | 2482 | ||
2481 | pci_unmap_single(priv->pci_dev, | 2483 | pci_unmap_single(priv->pci_dev, packet->dma_addr, |
2482 | packet->dma_addr, | ||
2483 | sizeof(struct ipw2100_rx), PCI_DMA_FROMDEVICE); | 2484 | sizeof(struct ipw2100_rx), PCI_DMA_FROMDEVICE); |
2484 | memmove(packet->skb->data + sizeof(struct ipw_rt_hdr), | 2485 | memmove(packet->skb->data + sizeof(struct ipw_rt_hdr), |
2485 | packet->skb->data, status->frame_size); | 2486 | packet->skb->data, status->frame_size); |
@@ -2488,7 +2489,7 @@ static void isr_rx_monitor(struct ipw2100_priv *priv, int i, | |||
2488 | 2489 | ||
2489 | ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION; | 2490 | ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION; |
2490 | ipw_rt->rt_hdr.it_pad = 0; /* always good to zero */ | 2491 | ipw_rt->rt_hdr.it_pad = 0; /* always good to zero */ |
2491 | ipw_rt->rt_hdr.it_len = sizeof(struct ipw_rt_hdr); /* total header+data */ | 2492 | ipw_rt->rt_hdr.it_len = sizeof(struct ipw_rt_hdr); /* total hdr+data */ |
2492 | 2493 | ||
2493 | ipw_rt->rt_hdr.it_present = 1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL; | 2494 | ipw_rt->rt_hdr.it_present = 1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL; |
2494 | 2495 | ||