b43: include FCS in frames handed to mac80211
Johannes Berg
maintainerPATCH 1/1 b43: include FCS in frames handed to mac80211
Sometimes it can be useful to see the FCS, especially when bad-FCS frames are shown. Pass the FCS to mac80211 and let it worry about snipping it off when required.
--- drivers/net/wireless/b43/main.c | 3 ++- drivers/net/wireless/b43/xmit.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/b43/main.c +2 -1
@@ -4158,7 +4158,8 @@ static int b43_wireless_init(struct ssb_ }/* fill hw info */ - hw->flags =IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE ; + hw->flags =IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE | +IEEE80211_HW_RX_INCLUDES_FCS ; hw->max_signal =100 ; hw->max_rssi =-110 ; hw->max_noise =-110 ;
drivers/net/wireless/b43/xmit.c +0 -1
@@ -489,7 +489,6 @@ void b43_rx(struct b43_wldev *dev, struc } wlhdr = (struct ieee80211_hdr *)(skb->data); fctl =le16_to_cpu (wlhdr->frame_control); -skb_trim (skb, skb->len -FCS_LEN );if (macstat &B43_RX_MAC_DEC ) {unsigned int keyidx;
Quoted 29 lines · On Friday 23 November 2007 11:46:16 Johannes Berg wrote:
Sometimes it can be useful to see the FCS, especially when bad-FCS frames are shown. Pass the FCS to mac80211 and let it worry about snipping it off when required.
Signed-off-by Johannes Berg <[email protected]>--- drivers/net/wireless/b43/main.c | 3 ++- drivers/net/wireless/b43/xmit.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-)drivers/net/wireless/b43/main.c +2
-1@@ -4158,7 +4158,8 @@ static int b43_wireless_init(struct ssb_ }/* fill hw info */ - hw->flags =IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE ; + hw->flags =IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE | +IEEE80211_HW_RX_INCLUDES_FCS ; hw->max_signal =100 ; hw->max_rssi =-110 ; hw->max_noise =-110 ;
drivers/net/wireless/b43/xmit.c void b43_rx(struct b43_wldev *dev, struc · line 494
Quoted 7 lines
drivers/net/wireless/b43/xmit.c +0
-1@@ -489,7 +489,6 @@ void b43_rx(struct b43_wldev *dev, struc } wlhdr = (struct ieee80211_hdr *)(skb->data); fctl =le16_to_cpu (wlhdr->frame_control); -skb_trim (skb, skb->len -FCS_LEN );if (macstat &B43_RX_MAC_DEC ) {unsigned int keyidx;
Does this work with all encryption and non-encryption modes? There was a crypto related reason why we snipped off the FCS. Maybe that's gone, though.
Signature · 1 line
Greetings Michael.
Johannes Berg
maintainerQuoted 9 lines
Quoted 9 lines
drivers/net/wireless/b43/xmit.c +0
-1@@ -489,7 +489,6 @@ void b43_rx(struct b43_wldev *dev, struc } wlhdr = (struct ieee80211_hdr *)(skb->data); fctl =le16_to_cpu (wlhdr->frame_control); -skb_trim (skb, skb->len -FCS_LEN );
Quoted 10 lines
drivers/net/wireless/b43/xmit.c void b43_rx(struct b43_wldev *dev, struc · line 494
Quoted 6 lines
drivers/net/wireless/b43/xmit.c +0
-0if (macstat &B43_RX_MAC_DEC ) {unsigned int keyidx;Does this work with all encryption and non-encryption modes? There was a crypto related reason why we snipped off the FCS. Maybe that's gone, though.
Yeah there was but to be honest I couldn't think of the reason any more and I can't see one here because right afterwards the only thing we do is hand the frame to mac80211.
johannes
Johannes Berg
maintainerQuoted 19 lines · Johannes Berg
Quoted 8 lines
Quoted 8 lines
drivers/net/wireless/b43/xmit.c +0
-1@@ -489,7 +489,6 @@ void b43_rx(struct b43_wldev *dev, struc } wlhdr = (struct ieee80211_hdr *)(skb->data); fctl =le16_to_cpu (wlhdr->frame_control); -skb_trim (skb, skb->len -FCS_LEN );Quoted 10 lines
drivers/net/wireless/b43/xmit.c void b43_rx(struct b43_wldev *dev, struc · line 494
Quoted 6 lines
drivers/net/wireless/b43/xmit.c +0
-0if (macstat &B43_RX_MAC_DEC ) {unsigned int keyidx;Does this work with all encryption and non-encryption modes? There was a crypto related reason why we snipped off the FCS. Maybe that's gone, though.
Quoted 3 lines
Yeah there was but to be honest I couldn't think of the reason any more and I can't see one here because right afterwards the only thing we do is hand the frame to mac80211.
Ah, I remember now. We were doing "device hides WEP" and snipped off the ICV so didn't want to move around the FCS.
johannes