diff options
author | Eliad Peller <eliad@wizery.com> | 2010-09-19 12:55:08 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-09-21 11:05:28 -0400 |
commit | 58be4607d25f86962dee6cc6b30573f95303517e (patch) | |
tree | fc48ce3bd7357905eb12cfcb59958cb72ad8f58e /drivers/net/wireless/wl12xx | |
parent | 2c7808d9345b91bb19f6bfaebf7b9e0916b0859a (diff) |
wl1271: avoid redundant memcpy of rx_status
copy the rx_status directly to skb->cb (control buffer) instead of copying
it to a local struct and then copying it again (for each rx packet)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_rx.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_rx.c b/drivers/net/wireless/wl12xx/wl1271_rx.c index 019aa79cd9df..94da5dd7723c 100644 --- a/drivers/net/wireless/wl12xx/wl1271_rx.c +++ b/drivers/net/wireless/wl12xx/wl1271_rx.c | |||
@@ -76,7 +76,6 @@ static void wl1271_rx_status(struct wl1271 *wl, | |||
76 | 76 | ||
77 | static void wl1271_rx_handle_data(struct wl1271 *wl, u32 length) | 77 | static void wl1271_rx_handle_data(struct wl1271 *wl, u32 length) |
78 | { | 78 | { |
79 | struct ieee80211_rx_status rx_status; | ||
80 | struct wl1271_rx_descriptor *desc; | 79 | struct wl1271_rx_descriptor *desc; |
81 | struct sk_buff *skb; | 80 | struct sk_buff *skb; |
82 | u16 *fc; | 81 | u16 *fc; |
@@ -109,14 +108,13 @@ static void wl1271_rx_handle_data(struct wl1271 *wl, u32 length) | |||
109 | if ((*fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_BEACON) | 108 | if ((*fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_BEACON) |
110 | beacon = 1; | 109 | beacon = 1; |
111 | 110 | ||
112 | wl1271_rx_status(wl, desc, &rx_status, beacon); | 111 | wl1271_rx_status(wl, desc, IEEE80211_SKB_RXCB(skb), beacon); |
113 | 112 | ||
114 | wl1271_debug(DEBUG_RX, "rx skb 0x%p: %d B %s", skb, skb->len, | 113 | wl1271_debug(DEBUG_RX, "rx skb 0x%p: %d B %s", skb, skb->len, |
115 | beacon ? "beacon" : ""); | 114 | beacon ? "beacon" : ""); |
116 | 115 | ||
117 | skb_trim(skb, skb->len - desc->pad_len); | 116 | skb_trim(skb, skb->len - desc->pad_len); |
118 | 117 | ||
119 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); | ||
120 | ieee80211_rx_ni(wl->hw, skb); | 118 | ieee80211_rx_ni(wl->hw, skb); |
121 | } | 119 | } |
122 | 120 | ||