Loading drivers/net/wireless/ipw2100.h +2 −2 Original line number Original line Diff line number Diff line Loading @@ -885,7 +885,7 @@ struct ipw2100_priv { #define IPW_HEADER_802_11_SIZE sizeof(struct ieee80211_header_data) #define IPW_HEADER_802_11_SIZE sizeof(struct ieee80211_hdr_3addr) #define IPW_MAX_80211_PAYLOAD_SIZE 2304U #define IPW_MAX_80211_PAYLOAD_SIZE 2304U #define IPW_MAX_802_11_PAYLOAD_LENGTH 2312 #define IPW_MAX_802_11_PAYLOAD_LENGTH 2312 #define IPW_MAX_ACCEPTABLE_TX_FRAME_LENGTH 1536 #define IPW_MAX_ACCEPTABLE_TX_FRAME_LENGTH 1536 Loading @@ -900,7 +900,7 @@ struct ipw2100_priv { IPW_802_11_FCS_LENGTH) IPW_802_11_FCS_LENGTH) #define IPW_802_11_PAYLOAD_OFFSET \ #define IPW_802_11_PAYLOAD_OFFSET \ (sizeof(struct ieee80211_header_data) + \ (sizeof(struct ieee80211_hdr_3addr) + \ sizeof(struct ieee80211_snap_hdr)) sizeof(struct ieee80211_snap_hdr)) struct ipw2100_rx { struct ipw2100_rx { Loading drivers/usb/net/Makefile +0 −2 Original line number Original line Diff line number Diff line Loading @@ -8,5 +8,3 @@ obj-$(CONFIG_USB_PEGASUS) += pegasus.o obj-$(CONFIG_USB_RTL8150) += rtl8150.o obj-$(CONFIG_USB_RTL8150) += rtl8150.o obj-$(CONFIG_USB_USBNET) += usbnet.o obj-$(CONFIG_USB_USBNET) += usbnet.o obj-$(CONFIG_USB_ZD1201) += zd1201.o obj-$(CONFIG_USB_ZD1201) += zd1201.o CFLAGS_zd1201.o = -Idrivers/net/wireless/ drivers/usb/net/zd1201.c +8 −8 Original line number Original line Diff line number Diff line Loading @@ -21,7 +21,7 @@ #include <linux/string.h> #include <linux/string.h> #include <linux/if_arp.h> #include <linux/if_arp.h> #include <linux/firmware.h> #include <linux/firmware.h> #include <ieee802_11.h> #include <net/ieee80211.h> #include "zd1201.h" #include "zd1201.h" static struct usb_device_id zd1201_table[] = { static struct usb_device_id zd1201_table[] = { Loading Loading @@ -337,25 +337,25 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) goto resubmit; goto resubmit; } } if ((seq & IEEE802_11_SCTL_FRAG) || if ((seq & IEEE80211_SCTL_FRAG) || (fc & IEEE802_11_FCTL_MOREFRAGS)) { (fc & IEEE80211_FCTL_MOREFRAGS)) { struct zd1201_frag *frag = NULL; struct zd1201_frag *frag = NULL; char *ptr; char *ptr; if (datalen<14) if (datalen<14) goto resubmit; goto resubmit; if ((seq & IEEE802_11_SCTL_FRAG) == 0) { if ((seq & IEEE80211_SCTL_FRAG) == 0) { frag = kmalloc(sizeof(struct zd1201_frag*), frag = kmalloc(sizeof(struct zd1201_frag*), GFP_ATOMIC); GFP_ATOMIC); if (!frag) if (!frag) goto resubmit; goto resubmit; skb = dev_alloc_skb(IEEE802_11_DATA_LEN +14+2); skb = dev_alloc_skb(IEEE80211_DATA_LEN +14+2); if (!skb) { if (!skb) { kfree(frag); kfree(frag); goto resubmit; goto resubmit; } } frag->skb = skb; frag->skb = skb; frag->seq = seq & IEEE802_11_SCTL_SEQ; frag->seq = seq & IEEE80211_SCTL_SEQ; skb_reserve(skb, 2); skb_reserve(skb, 2); memcpy(skb_put(skb, 12), &data[datalen-14], 12); memcpy(skb_put(skb, 12), &data[datalen-14], 12); memcpy(skb_put(skb, 2), &data[6], 2); memcpy(skb_put(skb, 2), &data[6], 2); Loading @@ -364,7 +364,7 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) goto resubmit; goto resubmit; } } hlist_for_each_entry(frag, node, &zd->fraglist, fnode) hlist_for_each_entry(frag, node, &zd->fraglist, fnode) if(frag->seq == (seq&IEEE802_11_SCTL_SEQ)) if(frag->seq == (seq&IEEE80211_SCTL_SEQ)) break; break; if (!frag) if (!frag) goto resubmit; goto resubmit; Loading @@ -372,7 +372,7 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) ptr = skb_put(skb, len); ptr = skb_put(skb, len); if (ptr) if (ptr) memcpy(ptr, data+8, len); memcpy(ptr, data+8, len); if (fc & IEEE802_11_FCTL_MOREFRAGS) if (fc & IEEE80211_FCTL_MOREFRAGS) goto resubmit; goto resubmit; hlist_del_init(&frag->fnode); hlist_del_init(&frag->fnode); kfree(frag); kfree(frag); Loading include/net/ieee80211.h +8 −32 Original line number Original line Diff line number Diff line Loading @@ -93,6 +93,8 @@ struct eapol { u16 length; u16 length; } __attribute__ ((packed)); } __attribute__ ((packed)); #define IEEE80211_1ADDR_LEN 10 #define IEEE80211_2ADDR_LEN 16 #define IEEE80211_3ADDR_LEN 24 #define IEEE80211_3ADDR_LEN 24 #define IEEE80211_4ADDR_LEN 30 #define IEEE80211_4ADDR_LEN 30 #define IEEE80211_FCS_LEN 4 #define IEEE80211_FCS_LEN 4 Loading Loading @@ -299,23 +301,6 @@ struct ieee80211_snap_hdr { #define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9 #define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9 /* Information Element IDs */ #define WLAN_EID_SSID 0 #define WLAN_EID_SUPP_RATES 1 #define WLAN_EID_FH_PARAMS 2 #define WLAN_EID_DS_PARAMS 3 #define WLAN_EID_CF_PARAMS 4 #define WLAN_EID_TIM 5 #define WLAN_EID_IBSS_PARAMS 6 #define WLAN_EID_CHALLENGE 16 #define WLAN_EID_RSN 48 #define WLAN_EID_GENERIC 221 #define IEEE80211_MGMT_HDR_LEN 24 #define IEEE80211_DATA_HDR3_LEN 24 #define IEEE80211_DATA_HDR4_LEN 30 #define IEEE80211_STATMASK_SIGNAL (1<<0) #define IEEE80211_STATMASK_SIGNAL (1<<0) #define IEEE80211_STATMASK_RSSI (1<<1) #define IEEE80211_STATMASK_RSSI (1<<1) #define IEEE80211_STATMASK_NOISE (1<<2) #define IEEE80211_STATMASK_NOISE (1<<2) Loading Loading @@ -489,15 +474,6 @@ Total: 28-2340 bytes */ */ struct ieee80211_header_data { u16 frame_ctl; u16 duration_id; u8 addr1[6]; u8 addr2[6]; u8 addr3[6]; u16 seq_ctrl; }; #define BEACON_PROBE_SSID_ID_POSITION 12 #define BEACON_PROBE_SSID_ID_POSITION 12 /* Management Frame Information Element Types */ /* Management Frame Information Element Types */ Loading Loading @@ -542,7 +518,7 @@ struct ieee80211_info_element { */ */ struct ieee80211_authentication { struct ieee80211_authentication { struct ieee80211_header_data header; struct ieee80211_hdr_3addr header; u16 algorithm; u16 algorithm; u16 transaction; u16 transaction; u16 status; u16 status; Loading @@ -551,7 +527,7 @@ struct ieee80211_authentication { struct ieee80211_probe_response { struct ieee80211_probe_response { struct ieee80211_header_data header; struct ieee80211_hdr_3addr header; u32 time_stamp[2]; u32 time_stamp[2]; u16 beacon_interval; u16 beacon_interval; u16 capability; u16 capability; Loading Loading @@ -793,21 +769,21 @@ extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mod extern inline int ieee80211_get_hdrlen(u16 fc) extern inline int ieee80211_get_hdrlen(u16 fc) { { int hdrlen = 24; int hdrlen = IEEE80211_3ADDR_LEN; switch (WLAN_FC_GET_TYPE(fc)) { switch (WLAN_FC_GET_TYPE(fc)) { case IEEE80211_FTYPE_DATA: case IEEE80211_FTYPE_DATA: if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS)) if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS)) hdrlen = 30; /* Addr4 */ hdrlen = IEEE80211_4ADDR_LEN; break; break; case IEEE80211_FTYPE_CTL: case IEEE80211_FTYPE_CTL: switch (WLAN_FC_GET_STYPE(fc)) { switch (WLAN_FC_GET_STYPE(fc)) { case IEEE80211_STYPE_CTS: case IEEE80211_STYPE_CTS: case IEEE80211_STYPE_ACK: case IEEE80211_STYPE_ACK: hdrlen = 10; hdrlen = IEEE80211_1ADDR_LEN; break; break; default: default: hdrlen = 16; hdrlen = IEEE80211_2ADDR_LEN; break; break; } } break; break; Loading net/ieee80211/Kconfig +2 −0 Original line number Original line Diff line number Diff line Loading @@ -44,6 +44,7 @@ config IEEE80211_CRYPT_WEP config IEEE80211_CRYPT_CCMP config IEEE80211_CRYPT_CCMP tristate "IEEE 802.11i CCMP support" tristate "IEEE 802.11i CCMP support" depends on IEEE80211 depends on IEEE80211 select CRYPTO select CRYPTO_AES select CRYPTO_AES ---help--- ---help--- Include software based cipher suites in support of IEEE 802.11i Include software based cipher suites in support of IEEE 802.11i Loading @@ -56,6 +57,7 @@ config IEEE80211_CRYPT_CCMP config IEEE80211_CRYPT_TKIP config IEEE80211_CRYPT_TKIP tristate "IEEE 802.11i TKIP encryption" tristate "IEEE 802.11i TKIP encryption" depends on IEEE80211 depends on IEEE80211 select CRYPTO select CRYPTO_MICHAEL_MIC select CRYPTO_MICHAEL_MIC ---help--- ---help--- Include software based cipher suites in support of IEEE 802.11i Include software based cipher suites in support of IEEE 802.11i Loading Loading
drivers/net/wireless/ipw2100.h +2 −2 Original line number Original line Diff line number Diff line Loading @@ -885,7 +885,7 @@ struct ipw2100_priv { #define IPW_HEADER_802_11_SIZE sizeof(struct ieee80211_header_data) #define IPW_HEADER_802_11_SIZE sizeof(struct ieee80211_hdr_3addr) #define IPW_MAX_80211_PAYLOAD_SIZE 2304U #define IPW_MAX_80211_PAYLOAD_SIZE 2304U #define IPW_MAX_802_11_PAYLOAD_LENGTH 2312 #define IPW_MAX_802_11_PAYLOAD_LENGTH 2312 #define IPW_MAX_ACCEPTABLE_TX_FRAME_LENGTH 1536 #define IPW_MAX_ACCEPTABLE_TX_FRAME_LENGTH 1536 Loading @@ -900,7 +900,7 @@ struct ipw2100_priv { IPW_802_11_FCS_LENGTH) IPW_802_11_FCS_LENGTH) #define IPW_802_11_PAYLOAD_OFFSET \ #define IPW_802_11_PAYLOAD_OFFSET \ (sizeof(struct ieee80211_header_data) + \ (sizeof(struct ieee80211_hdr_3addr) + \ sizeof(struct ieee80211_snap_hdr)) sizeof(struct ieee80211_snap_hdr)) struct ipw2100_rx { struct ipw2100_rx { Loading
drivers/usb/net/Makefile +0 −2 Original line number Original line Diff line number Diff line Loading @@ -8,5 +8,3 @@ obj-$(CONFIG_USB_PEGASUS) += pegasus.o obj-$(CONFIG_USB_RTL8150) += rtl8150.o obj-$(CONFIG_USB_RTL8150) += rtl8150.o obj-$(CONFIG_USB_USBNET) += usbnet.o obj-$(CONFIG_USB_USBNET) += usbnet.o obj-$(CONFIG_USB_ZD1201) += zd1201.o obj-$(CONFIG_USB_ZD1201) += zd1201.o CFLAGS_zd1201.o = -Idrivers/net/wireless/
drivers/usb/net/zd1201.c +8 −8 Original line number Original line Diff line number Diff line Loading @@ -21,7 +21,7 @@ #include <linux/string.h> #include <linux/string.h> #include <linux/if_arp.h> #include <linux/if_arp.h> #include <linux/firmware.h> #include <linux/firmware.h> #include <ieee802_11.h> #include <net/ieee80211.h> #include "zd1201.h" #include "zd1201.h" static struct usb_device_id zd1201_table[] = { static struct usb_device_id zd1201_table[] = { Loading Loading @@ -337,25 +337,25 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) goto resubmit; goto resubmit; } } if ((seq & IEEE802_11_SCTL_FRAG) || if ((seq & IEEE80211_SCTL_FRAG) || (fc & IEEE802_11_FCTL_MOREFRAGS)) { (fc & IEEE80211_FCTL_MOREFRAGS)) { struct zd1201_frag *frag = NULL; struct zd1201_frag *frag = NULL; char *ptr; char *ptr; if (datalen<14) if (datalen<14) goto resubmit; goto resubmit; if ((seq & IEEE802_11_SCTL_FRAG) == 0) { if ((seq & IEEE80211_SCTL_FRAG) == 0) { frag = kmalloc(sizeof(struct zd1201_frag*), frag = kmalloc(sizeof(struct zd1201_frag*), GFP_ATOMIC); GFP_ATOMIC); if (!frag) if (!frag) goto resubmit; goto resubmit; skb = dev_alloc_skb(IEEE802_11_DATA_LEN +14+2); skb = dev_alloc_skb(IEEE80211_DATA_LEN +14+2); if (!skb) { if (!skb) { kfree(frag); kfree(frag); goto resubmit; goto resubmit; } } frag->skb = skb; frag->skb = skb; frag->seq = seq & IEEE802_11_SCTL_SEQ; frag->seq = seq & IEEE80211_SCTL_SEQ; skb_reserve(skb, 2); skb_reserve(skb, 2); memcpy(skb_put(skb, 12), &data[datalen-14], 12); memcpy(skb_put(skb, 12), &data[datalen-14], 12); memcpy(skb_put(skb, 2), &data[6], 2); memcpy(skb_put(skb, 2), &data[6], 2); Loading @@ -364,7 +364,7 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) goto resubmit; goto resubmit; } } hlist_for_each_entry(frag, node, &zd->fraglist, fnode) hlist_for_each_entry(frag, node, &zd->fraglist, fnode) if(frag->seq == (seq&IEEE802_11_SCTL_SEQ)) if(frag->seq == (seq&IEEE80211_SCTL_SEQ)) break; break; if (!frag) if (!frag) goto resubmit; goto resubmit; Loading @@ -372,7 +372,7 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) ptr = skb_put(skb, len); ptr = skb_put(skb, len); if (ptr) if (ptr) memcpy(ptr, data+8, len); memcpy(ptr, data+8, len); if (fc & IEEE802_11_FCTL_MOREFRAGS) if (fc & IEEE80211_FCTL_MOREFRAGS) goto resubmit; goto resubmit; hlist_del_init(&frag->fnode); hlist_del_init(&frag->fnode); kfree(frag); kfree(frag); Loading
include/net/ieee80211.h +8 −32 Original line number Original line Diff line number Diff line Loading @@ -93,6 +93,8 @@ struct eapol { u16 length; u16 length; } __attribute__ ((packed)); } __attribute__ ((packed)); #define IEEE80211_1ADDR_LEN 10 #define IEEE80211_2ADDR_LEN 16 #define IEEE80211_3ADDR_LEN 24 #define IEEE80211_3ADDR_LEN 24 #define IEEE80211_4ADDR_LEN 30 #define IEEE80211_4ADDR_LEN 30 #define IEEE80211_FCS_LEN 4 #define IEEE80211_FCS_LEN 4 Loading Loading @@ -299,23 +301,6 @@ struct ieee80211_snap_hdr { #define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9 #define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9 /* Information Element IDs */ #define WLAN_EID_SSID 0 #define WLAN_EID_SUPP_RATES 1 #define WLAN_EID_FH_PARAMS 2 #define WLAN_EID_DS_PARAMS 3 #define WLAN_EID_CF_PARAMS 4 #define WLAN_EID_TIM 5 #define WLAN_EID_IBSS_PARAMS 6 #define WLAN_EID_CHALLENGE 16 #define WLAN_EID_RSN 48 #define WLAN_EID_GENERIC 221 #define IEEE80211_MGMT_HDR_LEN 24 #define IEEE80211_DATA_HDR3_LEN 24 #define IEEE80211_DATA_HDR4_LEN 30 #define IEEE80211_STATMASK_SIGNAL (1<<0) #define IEEE80211_STATMASK_SIGNAL (1<<0) #define IEEE80211_STATMASK_RSSI (1<<1) #define IEEE80211_STATMASK_RSSI (1<<1) #define IEEE80211_STATMASK_NOISE (1<<2) #define IEEE80211_STATMASK_NOISE (1<<2) Loading Loading @@ -489,15 +474,6 @@ Total: 28-2340 bytes */ */ struct ieee80211_header_data { u16 frame_ctl; u16 duration_id; u8 addr1[6]; u8 addr2[6]; u8 addr3[6]; u16 seq_ctrl; }; #define BEACON_PROBE_SSID_ID_POSITION 12 #define BEACON_PROBE_SSID_ID_POSITION 12 /* Management Frame Information Element Types */ /* Management Frame Information Element Types */ Loading Loading @@ -542,7 +518,7 @@ struct ieee80211_info_element { */ */ struct ieee80211_authentication { struct ieee80211_authentication { struct ieee80211_header_data header; struct ieee80211_hdr_3addr header; u16 algorithm; u16 algorithm; u16 transaction; u16 transaction; u16 status; u16 status; Loading @@ -551,7 +527,7 @@ struct ieee80211_authentication { struct ieee80211_probe_response { struct ieee80211_probe_response { struct ieee80211_header_data header; struct ieee80211_hdr_3addr header; u32 time_stamp[2]; u32 time_stamp[2]; u16 beacon_interval; u16 beacon_interval; u16 capability; u16 capability; Loading Loading @@ -793,21 +769,21 @@ extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mod extern inline int ieee80211_get_hdrlen(u16 fc) extern inline int ieee80211_get_hdrlen(u16 fc) { { int hdrlen = 24; int hdrlen = IEEE80211_3ADDR_LEN; switch (WLAN_FC_GET_TYPE(fc)) { switch (WLAN_FC_GET_TYPE(fc)) { case IEEE80211_FTYPE_DATA: case IEEE80211_FTYPE_DATA: if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS)) if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS)) hdrlen = 30; /* Addr4 */ hdrlen = IEEE80211_4ADDR_LEN; break; break; case IEEE80211_FTYPE_CTL: case IEEE80211_FTYPE_CTL: switch (WLAN_FC_GET_STYPE(fc)) { switch (WLAN_FC_GET_STYPE(fc)) { case IEEE80211_STYPE_CTS: case IEEE80211_STYPE_CTS: case IEEE80211_STYPE_ACK: case IEEE80211_STYPE_ACK: hdrlen = 10; hdrlen = IEEE80211_1ADDR_LEN; break; break; default: default: hdrlen = 16; hdrlen = IEEE80211_2ADDR_LEN; break; break; } } break; break; Loading
net/ieee80211/Kconfig +2 −0 Original line number Original line Diff line number Diff line Loading @@ -44,6 +44,7 @@ config IEEE80211_CRYPT_WEP config IEEE80211_CRYPT_CCMP config IEEE80211_CRYPT_CCMP tristate "IEEE 802.11i CCMP support" tristate "IEEE 802.11i CCMP support" depends on IEEE80211 depends on IEEE80211 select CRYPTO select CRYPTO_AES select CRYPTO_AES ---help--- ---help--- Include software based cipher suites in support of IEEE 802.11i Include software based cipher suites in support of IEEE 802.11i Loading @@ -56,6 +57,7 @@ config IEEE80211_CRYPT_CCMP config IEEE80211_CRYPT_TKIP config IEEE80211_CRYPT_TKIP tristate "IEEE 802.11i TKIP encryption" tristate "IEEE 802.11i TKIP encryption" depends on IEEE80211 depends on IEEE80211 select CRYPTO select CRYPTO_MICHAEL_MIC select CRYPTO_MICHAEL_MIC ---help--- ---help--- Include software based cipher suites in support of IEEE 802.11i Include software based cipher suites in support of IEEE 802.11i Loading