summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-03-15 21:38:07 +0100
committerJohn W. Linville <linville@tuxdriver.com>2008-03-25 16:41:58 -0400
commit19d30e02998ef1eb9f82a7d3ce9b4a97dba5aa13 (patch)
tree66972ff817b2d6b8641a04d4f6e122e8fdc710ba /drivers/net/wireless/rt2x00/rt2x00dev.c
parente2839d8f509451acf6b1f22787f25ce98383d94c (diff)
downloadlwn-19d30e02998ef1eb9f82a7d3ce9b4a97dba5aa13.tar.gz
lwn-19d30e02998ef1eb9f82a7d3ce9b4a97dba5aa13.zip
rt2x00: Add dev_flags to rx descriptor
The rxdone_entry_desc structure contains 3 fields which are always 1 or 0. We can safe 8 bytes by replacing them with a single dev_flags fields which contain the flags for those settings. Additionally we can remove the OFDM flag since it is no longer used since the introduction of the SIGNAL_PLCP flag. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index acf4d67ba43d..4fd0c25aebf3 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -580,8 +580,10 @@ void rt2x00lib_rxdone(struct queue_entry *entry,
for (i = 0; i < sband->n_bitrates; i++) {
rate = rt2x00_get_rate(sband->bitrates[i].hw_value);
- if ((rxdesc->signal_plcp && rate->plcp == rxdesc->signal) ||
- (!rxdesc->signal_plcp && rate->bitrate == rxdesc->signal)) {
+ if (((rxdesc->dev_flags & RXDONE_SIGNAL_PLCP) &&
+ (rate->plcp == rxdesc->signal)) ||
+ (!(rxdesc->dev_flags & RXDONE_SIGNAL_PLCP) &&
+ (rate->bitrate == rxdesc->signal))) {
idx = i;
break;
}
@@ -592,7 +594,7 @@ void rt2x00lib_rxdone(struct queue_entry *entry,
*/
hdr = (struct ieee80211_hdr *)entry->skb->data;
fc = le16_to_cpu(hdr->frame_control);
- if (is_beacon(fc) && rxdesc->my_bss)
+ if (is_beacon(fc) && (rxdesc->dev_flags & RXDONE_MY_BSS))
rt2x00lib_update_link_stats(&rt2x00dev->link, rxdesc->rssi);
rt2x00dev->link.qual.rx_success++;