diff options
| author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-06-15 02:33:40 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2008-06-26 16:49:14 -0400 |
| commit | b99a017c01bb19b58fd0826e36a1bdacf581c545 (patch) | |
| tree | 0847d4fa049a58ce30ea37e50213a08423eac0c9 /drivers/net/wireless/b43legacy | |
| parent | f37d923422b61884a75a2a64865ed03ca5ccfc6d (diff) | |
b43legacy: use frame control helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy')
| -rw-r--r-- | drivers/net/wireless/b43legacy/xmit.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/wireless/b43legacy/xmit.c b/drivers/net/wireless/b43legacy/xmit.c index 82dc04d59446..a3540787eb50 100644 --- a/drivers/net/wireless/b43legacy/xmit.c +++ b/drivers/net/wireless/b43legacy/xmit.c | |||
| @@ -442,7 +442,7 @@ void b43legacy_rx(struct b43legacy_wldev *dev, | |||
| 442 | struct b43legacy_plcp_hdr6 *plcp; | 442 | struct b43legacy_plcp_hdr6 *plcp; |
| 443 | struct ieee80211_hdr *wlhdr; | 443 | struct ieee80211_hdr *wlhdr; |
| 444 | const struct b43legacy_rxhdr_fw3 *rxhdr = _rxhdr; | 444 | const struct b43legacy_rxhdr_fw3 *rxhdr = _rxhdr; |
| 445 | u16 fctl; | 445 | __le16 fctl; |
| 446 | u16 phystat0; | 446 | u16 phystat0; |
| 447 | u16 phystat3; | 447 | u16 phystat3; |
| 448 | u16 chanstat; | 448 | u16 chanstat; |
| @@ -480,7 +480,7 @@ void b43legacy_rx(struct b43legacy_wldev *dev, | |||
| 480 | goto drop; | 480 | goto drop; |
| 481 | } | 481 | } |
| 482 | wlhdr = (struct ieee80211_hdr *)(skb->data); | 482 | wlhdr = (struct ieee80211_hdr *)(skb->data); |
| 483 | fctl = le16_to_cpu(wlhdr->frame_control); | 483 | fctl = wlhdr->frame_control; |
| 484 | 484 | ||
| 485 | if ((macstat & B43legacy_RX_MAC_DEC) && | 485 | if ((macstat & B43legacy_RX_MAC_DEC) && |
| 486 | !(macstat & B43legacy_RX_MAC_DECERR)) { | 486 | !(macstat & B43legacy_RX_MAC_DECERR)) { |
| @@ -499,11 +499,11 @@ void b43legacy_rx(struct b43legacy_wldev *dev, | |||
| 499 | 499 | ||
| 500 | if (dev->key[keyidx].algorithm != B43legacy_SEC_ALGO_NONE) { | 500 | if (dev->key[keyidx].algorithm != B43legacy_SEC_ALGO_NONE) { |
| 501 | /* Remove PROTECTED flag to mark it as decrypted. */ | 501 | /* Remove PROTECTED flag to mark it as decrypted. */ |
| 502 | B43legacy_WARN_ON(!(fctl & IEEE80211_FCTL_PROTECTED)); | 502 | B43legacy_WARN_ON(!ieee80211_has_protected(fctl)); |
| 503 | fctl &= ~IEEE80211_FCTL_PROTECTED; | 503 | fctl &= ~cpu_to_le16(IEEE80211_FCTL_PROTECTED); |
| 504 | wlhdr->frame_control = cpu_to_le16(fctl); | 504 | wlhdr->frame_control = fctl; |
| 505 | 505 | ||
| 506 | wlhdr_len = ieee80211_get_hdrlen(fctl); | 506 | wlhdr_len = ieee80211_hdrlen(fctl); |
| 507 | if (unlikely(skb->len < (wlhdr_len + 3))) { | 507 | if (unlikely(skb->len < (wlhdr_len + 3))) { |
| 508 | b43legacydbg(dev->wl, "RX: Packet size" | 508 | b43legacydbg(dev->wl, "RX: Packet size" |
| 509 | " underrun3\n"); | 509 | " underrun3\n"); |
| @@ -556,9 +556,7 @@ void b43legacy_rx(struct b43legacy_wldev *dev, | |||
| 556 | * of timestamp, i.e. about 65 milliseconds after the PHY received | 556 | * of timestamp, i.e. about 65 milliseconds after the PHY received |
| 557 | * the first symbol. | 557 | * the first symbol. |
| 558 | */ | 558 | */ |
| 559 | if (((fctl & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) | 559 | if (ieee80211_is_beacon(fctl) || dev->wl->radiotap_enabled) { |
| 560 | == (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON)) || | ||
| 561 | dev->wl->radiotap_enabled) { | ||
| 562 | u16 low_mactime_now; | 560 | u16 low_mactime_now; |
| 563 | 561 | ||
| 564 | b43legacy_tsf_read(dev, &status.mactime); | 562 | b43legacy_tsf_read(dev, &status.mactime); |
