rt2x00: Remove ieee80211_rx_status from rt2x00_dev
rt2x00 was keeping a copy of ieee80211_rx_status embedded into the rt2x00_dev structure. For each RX frame, this structure was copied into the skb->cb where mac80211 would handle it further. However at the moment only the fields current band, and frequency were updated. Whereas the band was already provided directly within the rt2x00_dev structure. Save a memcpy action, and reduce memory a bit, by adding a curr_freq field to rt2x00_dev, and completely remove the ieee80211_rx_status structure from rt2x00_dev. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
0856d9c04a
commit
e5ef5bad34
@@ -464,7 +464,7 @@ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev,
|
||||
{
|
||||
struct rxdone_entry_desc rxdesc;
|
||||
struct sk_buff *skb;
|
||||
struct ieee80211_rx_status *rx_status = &rt2x00dev->rx_status;
|
||||
struct ieee80211_rx_status *rx_status;
|
||||
unsigned int header_length;
|
||||
int rate_idx;
|
||||
|
||||
@@ -535,19 +535,21 @@ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev,
|
||||
*/
|
||||
rt2x00link_update_stats(rt2x00dev, entry->skb, &rxdesc);
|
||||
rt2x00debug_update_crypto(rt2x00dev, &rxdesc);
|
||||
rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_RXDONE, entry->skb);
|
||||
|
||||
/*
|
||||
* Initialize RX status information, and send frame
|
||||
* to mac80211.
|
||||
*/
|
||||
rx_status = IEEE80211_SKB_RXCB(entry->skb);
|
||||
rx_status->mactime = rxdesc.timestamp;
|
||||
rx_status->band = rt2x00dev->curr_band;
|
||||
rx_status->freq = rt2x00dev->curr_freq;
|
||||
rx_status->rate_idx = rate_idx;
|
||||
rx_status->signal = rxdesc.rssi;
|
||||
rx_status->flag = rxdesc.flags;
|
||||
rx_status->antenna = rt2x00dev->link.ant.active.rx;
|
||||
|
||||
/*
|
||||
* Send frame to mac80211 & debugfs.
|
||||
* mac80211 will clean up the skb structure.
|
||||
*/
|
||||
rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_RXDONE, entry->skb);
|
||||
memcpy(IEEE80211_SKB_RXCB(entry->skb), rx_status, sizeof(*rx_status));
|
||||
ieee80211_rx_ni(rt2x00dev->hw, entry->skb);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user