diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-06-15 02:33:38 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-26 16:49:13 -0400 |
commit | 24b56e705587cd3a51efb1229e73ea6e3e757f05 (patch) | |
tree | fa9361248a2c16faf69f11f00e0e22a78eea8f8b | |
parent | 94d9842403f770239a656586442454b7a8f2df29 (diff) |
ath5k: use frame control helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath5k/base.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 85045afc1ba7..010c66555950 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -1691,9 +1691,9 @@ ath5k_rx_decrypted(struct ath5k_softc *sc, struct ath5k_desc *ds, | |||
1691 | /* Apparently when a default key is used to decrypt the packet | 1691 | /* Apparently when a default key is used to decrypt the packet |
1692 | the hw does not set the index used to decrypt. In such cases | 1692 | the hw does not set the index used to decrypt. In such cases |
1693 | get the index from the packet. */ | 1693 | get the index from the packet. */ |
1694 | if ((le16_to_cpu(hdr->frame_control) & IEEE80211_FCTL_PROTECTED) && | 1694 | if (ieee80211_has_protected(hdr->frame_control) && |
1695 | !(rs->rs_status & AR5K_RXERR_DECRYPT) && | 1695 | !(rs->rs_status & AR5K_RXERR_DECRYPT) && |
1696 | skb->len >= hlen + 4) { | 1696 | skb->len >= hlen + 4) { |
1697 | keyix = skb->data[hlen + 3] >> 6; | 1697 | keyix = skb->data[hlen + 3] >> 6; |
1698 | 1698 | ||
1699 | if (test_bit(keyix, sc->keymap)) | 1699 | if (test_bit(keyix, sc->keymap)) |
@@ -1712,10 +1712,7 @@ ath5k_check_ibss_tsf(struct ath5k_softc *sc, struct sk_buff *skb, | |||
1712 | u32 hw_tu; | 1712 | u32 hw_tu; |
1713 | struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data; | 1713 | struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data; |
1714 | 1714 | ||
1715 | if ((le16_to_cpu(mgmt->frame_control) & IEEE80211_FCTL_FTYPE) == | 1715 | if (ieee80211_is_beacon(mgmt->frame_control) && |
1716 | IEEE80211_FTYPE_MGMT && | ||
1717 | (le16_to_cpu(mgmt->frame_control) & IEEE80211_FCTL_STYPE) == | ||
1718 | IEEE80211_STYPE_BEACON && | ||
1719 | le16_to_cpu(mgmt->u.beacon.capab_info) & WLAN_CAPABILITY_IBSS && | 1716 | le16_to_cpu(mgmt->u.beacon.capab_info) & WLAN_CAPABILITY_IBSS && |
1720 | memcmp(mgmt->bssid, sc->ah->ah_bssid, ETH_ALEN) == 0) { | 1717 | memcmp(mgmt->bssid, sc->ah->ah_bssid, ETH_ALEN) == 0) { |
1721 | /* | 1718 | /* |