aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl818x
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/net/wireless/rtl818x
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/net/wireless/rtl818x')
-rw-r--r--drivers/net/wireless/rtl818x/rtl8180_dev.c3
-rw-r--r--drivers/net/wireless/rtl818x/rtl8187_dev.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c
index 7e65d7c31802..47521c5b6f91 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c
@@ -143,7 +143,8 @@ static void rtl8180_handle_rx(struct ieee80211_hw *dev)
143 if (flags & RTL818X_RX_DESC_FLAG_CRC32_ERR) 143 if (flags & RTL818X_RX_DESC_FLAG_CRC32_ERR)
144 rx_status.flag |= RX_FLAG_FAILED_FCS_CRC; 144 rx_status.flag |= RX_FLAG_FAILED_FCS_CRC;
145 145
146 ieee80211_rx_irqsafe(dev, skb, &rx_status); 146 memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
147 ieee80211_rx_irqsafe(dev, skb);
147 148
148 skb = new_skb; 149 skb = new_skb;
149 priv->rx_buf[priv->rx_idx] = skb; 150 priv->rx_buf[priv->rx_idx] = skb;
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c
index 294250e294dd..c9b9dbe584c6 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c
@@ -380,7 +380,8 @@ static void rtl8187_rx_cb(struct urb *urb)
380 rx_status.flag |= RX_FLAG_TSFT; 380 rx_status.flag |= RX_FLAG_TSFT;
381 if (flags & RTL818X_RX_DESC_FLAG_CRC32_ERR) 381 if (flags & RTL818X_RX_DESC_FLAG_CRC32_ERR)
382 rx_status.flag |= RX_FLAG_FAILED_FCS_CRC; 382 rx_status.flag |= RX_FLAG_FAILED_FCS_CRC;
383 ieee80211_rx_irqsafe(dev, skb, &rx_status); 383 memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
384 ieee80211_rx_irqsafe(dev, skb);
384 385
385 skb = dev_alloc_skb(RTL8187_MAX_RX); 386 skb = dev_alloc_skb(RTL8187_MAX_RX);
386 if (unlikely(!skb)) { 387 if (unlikely(!skb)) {