aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2008-06-27 16:20:04 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-30 17:37:35 -0400
commitb53a5dabc5e0a0a1882a16446fb3d22d6a16114d (patch)
treeefa7185d18ed60d742e4a39703977212546534f4
parent245727c1805d68e58810b58b24d967c5dd22a8fa (diff)
hostap: don't skip any headers in hostap_80211_header_parse()
Don't try to skip any headers in hostap_80211_header_parse(). We never use that function for interfaces affected by local->monitor_type. Both the master and the AP interface receive 802.11 frames without any additional headers. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/hostap/hostap_main.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c
index f7aec9309d04..b5213f61fb0b 100644
--- a/drivers/net/wireless/hostap/hostap_main.c
+++ b/drivers/net/wireless/hostap/hostap_main.c
@@ -596,25 +596,7 @@ void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx)
596 596
597int hostap_80211_header_parse(const struct sk_buff *skb, unsigned char *haddr) 597int hostap_80211_header_parse(const struct sk_buff *skb, unsigned char *haddr)
598{ 598{
599 struct hostap_interface *iface = netdev_priv(skb->dev); 599 memcpy(haddr, skb_mac_header(skb) + 10, ETH_ALEN); /* addr2 */
600 local_info_t *local = iface->local;
601
602 if (local->monitor_type == PRISM2_MONITOR_PRISM ||
603 local->monitor_type == PRISM2_MONITOR_CAPHDR) {
604 const unsigned char *mac = skb_mac_header(skb);
605
606 if (*(u32 *)mac == LWNG_CAP_DID_BASE) {
607 memcpy(haddr,
608 mac + sizeof(struct linux_wlan_ng_prism_hdr) + 10,
609 ETH_ALEN); /* addr2 */
610 } else { /* (*(u32 *)mac == htonl(LWNG_CAPHDR_VERSION)) */
611 memcpy(haddr,
612 mac + sizeof(struct linux_wlan_ng_cap_hdr) + 10,
613 ETH_ALEN); /* addr2 */
614 }
615 } else
616 memcpy(haddr, skb_mac_header(skb) + 10, ETH_ALEN); /* addr2 */
617
618 return ETH_ALEN; 600 return ETH_ALEN;
619} 601}
620 602