summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-01-06 23:41:28 +0100
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:09:27 -0800
commit7e56d38d5d0bda89228821902af297a46b5fdb80 (patch)
treefadf90d9fdb96f00c1780e3dceed824435e51abf /drivers/net/wireless/rt2x00/rt2x00dev.c
parentdd3193e1c25ffbc66b684edb52273ae10695909d (diff)
downloadlwn-7e56d38d5d0bda89228821902af297a46b5fdb80.tar.gz
lwn-7e56d38d5d0bda89228821902af297a46b5fdb80.zip
rt2x00: Determine MY_BSS from descriptor
Use the MY_BSS descriptor field to determine if the received frame belongs to the same BSS as the interface. This can be used by rxdone to determine if the frame should be updated or not. 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.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index a95cf531f083..a11421274f79 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -526,7 +526,6 @@ void rt2x00lib_rxdone(struct data_entry *entry, struct sk_buff *skb,
struct rxdata_entry_desc *desc)
{
struct rt2x00_dev *rt2x00dev = entry->ring->rt2x00dev;
- struct interface *intf = &rt2x00dev->interface;
struct ieee80211_rx_status *rx_status = &rt2x00dev->rx_status;
struct ieee80211_hw_mode *mode;
struct ieee80211_rate *rate;
@@ -559,19 +558,12 @@ void rt2x00lib_rxdone(struct data_entry *entry, struct sk_buff *skb,
}
/*
- * Only update link status if this is a beacon frame carrying our
- * bssid.
+ * Only update link status if this is a beacon frame carrying our bssid.
*/
- hdr = (struct ieee80211_hdr *) skb->data;
- if (skb->len >= sizeof(struct ieee80211_hdr *)) {
- fc = le16_to_cpu(hdr->frame_control);
- if ((intf->type == IEEE80211_IF_TYPE_STA
- || intf->type == IEEE80211_IF_TYPE_IBSS)
- && is_beacon(fc)
- && compare_ether_addr(hdr->addr3, intf->bssid) == 0)
- rt2x00lib_update_link_stats(&rt2x00dev->link,
- desc->rssi);
- }
+ hdr = (struct ieee80211_hdr*)skb->data;
+ fc = le16_to_cpu(hdr->frame_control);
+ if (is_beacon(fc) && desc->my_bss)
+ rt2x00lib_update_link_stats(&rt2x00dev->link, desc->rssi);
rt2x00dev->link.qual.rx_success++;