aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-06-17 07:13:00 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 14:57:54 -0400
commitf1d58c2521eb160178b2151d6326d8dc5d7c8560 (patch)
treeaf373bb1a5fbb6bc9436d29095133992d33d6598 /drivers/staging
parent18ad01c43918751cc22f8ee28f6b38b8954a55b2 (diff)
mac80211: push rx status into skb->cb
Within mac80211, we often need to copy the rx status into skb->cb. This is wasteful, as drivers could be building it in there to start with. This patch changes the API so that drivers are expected to pass the RX status in skb->cb, now accessible as IEEE80211_SKB_RXCB(skb). It also updates all drivers to pass the rx status in there, but only by making them memcpy() it into place before the call to the receive function (ieee80211_rx(_irqsafe)). Each driver can now be optimised on its own schedule. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/agnx/xmit.c3
-rw-r--r--drivers/staging/stlc45xx/stlc45xx.c3
-rw-r--r--drivers/staging/winbond/wb35rx.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/agnx/xmit.c b/drivers/staging/agnx/xmit.c
index 0e034081f3a5..42db41070cf0 100644
--- a/drivers/staging/agnx/xmit.c
+++ b/drivers/staging/agnx/xmit.c
@@ -384,7 +384,8 @@ void handle_rx_irq(struct agnx_priv *priv)
384/* dump_ieee80211_hdr((struct ieee80211_hdr *)skb->data, "RX G"); */ 384/* dump_ieee80211_hdr((struct ieee80211_hdr *)skb->data, "RX G"); */
385 } else 385 } else
386 agnx_bug("Unknown packets type"); 386 agnx_bug("Unknown packets type");
387 ieee80211_rx_irqsafe(priv->hw, skb, &status); 387 memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status));
388 ieee80211_rx_irqsafe(priv->hw, skb);
388 rx_desc_reinit(priv, i); 389 rx_desc_reinit(priv, i);
389 390
390 } while (priv->rx.idx++); 391 } while (priv->rx.idx++);
diff --git a/drivers/staging/stlc45xx/stlc45xx.c b/drivers/staging/stlc45xx/stlc45xx.c
index cfdaac9b747e..52744faedbff 100644
--- a/drivers/staging/stlc45xx/stlc45xx.c
+++ b/drivers/staging/stlc45xx/stlc45xx.c
@@ -1429,7 +1429,8 @@ static int stlc45xx_rx_data(struct stlc45xx *stlc, struct sk_buff *skb)
1429 stlc45xx_debug(DEBUG_RX, "rx data 0x%p %d B", skb->data, skb->len); 1429 stlc45xx_debug(DEBUG_RX, "rx data 0x%p %d B", skb->data, skb->len);
1430 stlc45xx_dump(DEBUG_RX_CONTENT, skb->data, skb->len); 1430 stlc45xx_dump(DEBUG_RX_CONTENT, skb->data, skb->len);
1431 1431
1432 ieee80211_rx(stlc->hw, skb, &status); 1432 memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status));
1433 ieee80211_rx(stlc->hw, skb);
1433 1434
1434 return 0; 1435 return 0;
1435} 1436}
diff --git a/drivers/staging/winbond/wb35rx.c b/drivers/staging/winbond/wb35rx.c
index 3e8cf08b87e6..b905e7b43a19 100644
--- a/drivers/staging/winbond/wb35rx.c
+++ b/drivers/staging/winbond/wb35rx.c
@@ -40,7 +40,8 @@ static void packet_came(struct ieee80211_hw *hw, char *pRxBufferAddress, int Pac
40 rx_status.phymode = MODE_IEEE80211B; 40 rx_status.phymode = MODE_IEEE80211B;
41*/ 41*/
42 42
43 ieee80211_rx_irqsafe(hw, skb, &rx_status); 43 memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
44 ieee80211_rx_irqsafe(hw, skb);
44} 45}
45 46
46static void Wb35Rx_adjust(PDESCRIPTOR pRxDes) 47static void Wb35Rx_adjust(PDESCRIPTOR pRxDes)