hostap: don't skip any headers in hostap_80211_header_parse()
authorPavel Roskin <proski@gnu.org>
Fri, 27 Jun 2008 20:20:04 +0000 (16:20 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 30 Jun 2008 21:37:35 +0000 (17:37 -0400)
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>
drivers/net/wireless/hostap/hostap_main.c

index f7aec9309d0412c86dd0bc3fd111ff9c37ef7d5c..b5213f61fb0b2381c309d637858c42cc1d25c01d 100644 (file)
@@ -596,25 +596,7 @@ void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx)
 
 int hostap_80211_header_parse(const struct sk_buff *skb, unsigned char *haddr)
 {
-       struct hostap_interface *iface = netdev_priv(skb->dev);
-       local_info_t *local = iface->local;
-
-       if (local->monitor_type == PRISM2_MONITOR_PRISM ||
-           local->monitor_type == PRISM2_MONITOR_CAPHDR) {
-               const unsigned char *mac = skb_mac_header(skb);
-
-               if (*(u32 *)mac == LWNG_CAP_DID_BASE) {
-                       memcpy(haddr,
-                              mac + sizeof(struct linux_wlan_ng_prism_hdr) + 10,
-                              ETH_ALEN); /* addr2 */
-               } else { /* (*(u32 *)mac == htonl(LWNG_CAPHDR_VERSION)) */
-                       memcpy(haddr,
-                              mac + sizeof(struct linux_wlan_ng_cap_hdr) + 10,
-                              ETH_ALEN); /* addr2 */
-               }
-       } else
-               memcpy(haddr, skb_mac_header(skb) + 10, ETH_ALEN); /* addr2 */
-
+       memcpy(haddr, skb_mac_header(skb) + 10, ETH_ALEN); /* addr2 */
        return ETH_ALEN;
 }