Correct Devicescape ieee80211 layer so it can be compiled with current kernel. Add appropriate Makefile and Kconfig. Index: netdev/net/ieee80211/Makefile =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ netdev/net/ieee80211/Makefile 2005-10-12 17:50:07.000000000 +0200 @@ -0,0 +1,23 @@ +obj-$(CONFIG_IEEE80211) += 80211.o rate_control.o + +80211-objs := \ + ieee80211.o \ + ieee80211_ioctl.o \ + sta_info.o \ + wep.o \ + wpa.o \ + ieee80211_proc.o \ + ieee80211_scan.o \ + ieee80211_sta.o \ + michael.o \ + tkip.o \ + aes_ccm.o \ + wme.o + +ifeq ($(CONFIG_NET_SCHED),) + 80211-objs += fifo_qdisc.o +endif + +ifeq ($(CONFIG_IEEE80211_LEDS),y) + 80211-objs += ieee80211_led.o +endif Index: netdev/net/ieee80211/tkip.c =================================================================== --- netdev.orig/net/ieee80211/tkip.c 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/tkip.c 2005-10-12 18:11:22.000000000 +0200 @@ -7,22 +7,22 @@ * published by the Free Software Foundation. */ -#ifdef TKIP_DEBUG +#ifdef CONFIG_TKIP_DEBUG #include #include #include #include #include -#endif /* TKIP_DEBUG */ +#endif /* CONFIG_TKIP_DEBUG */ #include #include -#include "ieee80211.h" +#include #include "ieee80211_key.h" -#ifdef TKIP_DEBUG +#ifdef CONFIG_TKIP_DEBUG #include "ieee80211_i.h" -#endif /* TKIP_DEBUG */ +#endif /* CONFIG_TKIP_DEBUG */ #include "tkip.h" /* Dummy prototypes for structures used in wep.h, but not really needed for @@ -252,17 +252,17 @@ int ieee80211_tkip_decrypt_data(struct i keyid = pos[3]; iv32 = pos[4] | (pos[5] << 8) | (pos[6] << 16) | (pos[7] << 24); pos += 8; -#ifdef TKIP_DEBUG +#ifdef CONFIG_TKIP_DEBUG { int i; - printk(KERN_DEBUG "TKIP decrypt: data(len=%d)", payload_len); + printk(KERN_DEBUG "TKIP decrypt: data(len=%zd)", payload_len); for (i = 0; i < payload_len; i++) printk(" %02x", payload[i]); printk("\n"); printk(KERN_DEBUG "TKIP decrypt: iv16=%04x iv32=%08x\n", iv16, iv32); } -#endif /* TKIP_DEBUG */ +#endif /* CONFIG_TKIP_DEBUG */ if (!(keyid & (1 << 5))) return TKIP_DECRYPT_NO_EXT_IV; @@ -274,13 +274,13 @@ int ieee80211_tkip_decrypt_data(struct i (iv32 < key->u.tkip.iv32_rx[queue] || (iv32 == key->u.tkip.iv32_rx[queue] && iv16 <= key->u.tkip.iv16_rx[queue]))) { -#ifdef TKIP_DEBUG +#ifdef CONFIG_TKIP_DEBUG printk(KERN_DEBUG "TKIP replay detected for RX frame from " MACSTR " (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n", MAC2STR(ta), iv32, iv16, key->u.tkip.iv32_rx[queue], key->u.tkip.iv16_rx[queue]); -#endif /* TKIP_DEBUG */ +#endif /* CONFIG_TKIP_DEBUG */ return TKIP_DECRYPT_REPLAY; } @@ -295,7 +295,7 @@ int ieee80211_tkip_decrypt_data(struct i /* IV16 wrapped around - perform TKIP phase 1 */ tkip_mixing_phase1(ta, &key->key[ALG_TKIP_TEMP_ENCR_KEY], iv32, key->u.tkip.p1k_rx[queue]); -#ifdef TKIP_DEBUG +#ifdef CONFIG_TKIP_DEBUG { int i; printk(KERN_DEBUG "TKIP decrypt: Phase1 TA=" MACSTR @@ -309,13 +309,13 @@ int ieee80211_tkip_decrypt_data(struct i printk("%04x ", key->u.tkip.p1k_rx[queue][i]); printk("\n"); } -#endif /* TKIP_DEBUG */ +#endif /* CONFIG_TKIP_DEBUG */ } tkip_mixing_phase2(key->u.tkip.p1k_rx[queue], &key->key[ALG_TKIP_TEMP_ENCR_KEY], iv16, rc4key); -#ifdef TKIP_DEBUG +#ifdef CONFIG_TKIP_DEBUG { int i; printk(KERN_DEBUG "TKIP decrypt: Phase2 rc4key="); @@ -323,7 +323,7 @@ int ieee80211_tkip_decrypt_data(struct i printk("%02x ", rc4key[i]); printk("\n"); } -#endif /* TKIP_DEBUG */ +#endif /* CONFIG_TKIP_DEBUG */ res = ieee80211_wep_decrypt_data(rc4key, 16, pos, payload_len - 12); done: Index: netdev/net/ieee80211/rate_control.c =================================================================== --- netdev.orig/net/ieee80211/rate_control.c 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/rate_control.c 2005-10-12 17:50:07.000000000 +0200 @@ -17,7 +17,7 @@ #include #include -#include "ieee80211.h" +#include #include "ieee80211_i.h" #include "rate_control.h" @@ -194,7 +194,7 @@ static void rate_control_simple_tx_statu if (srctrl->avg_rate_update + 60 * HZ < jiffies) { srctrl->avg_rate_update = jiffies; if (srctrl->tx_avg_rate_num > 0) { -#ifdef IEEE80211_VERBOSE_DEBUG +#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG printk(KERN_DEBUG "%s: STA " MACSTR " Average rate: " "%d (%d/%d)\n", dev->name, MAC2STR(sta->addr), @@ -202,7 +202,7 @@ static void rate_control_simple_tx_statu srctrl->tx_avg_rate_num, srctrl->tx_avg_rate_sum, srctrl->tx_avg_rate_num); -#endif /* IEEE80211_VERBOSE_DEBUG */ +#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ srctrl->tx_avg_rate_sum = 0; srctrl->tx_avg_rate_num = 0; } Index: netdev/net/ieee80211/wpa.c =================================================================== --- netdev.orig/net/ieee80211/wpa.c 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/wpa.c 2005-10-12 17:50:07.000000000 +0200 @@ -19,9 +19,9 @@ #include #endif /* WIRELESS_EXT > 12 */ -#include "ieee80211.h" +#include +#include #include "ieee80211_i.h" -#include "ieee80211_common.h" #include "michael.h" #include "tkip.h" #include "aes_ccm.h" @@ -786,7 +786,7 @@ ieee80211_rx_h_ccmp_decrypt(struct ieee8 (void) ccmp_hdr2pn(pn, skb->data + hdrlen); if (memcmp(pn, key->u.ccmp.rx_pn[rx->u.rx.queue], CCMP_PN_LEN) <= 0) { -#ifdef IEEE80211_DEBUG +#ifdef CONFIG_IEEE80211_DEBUG u8 *ppn = key->u.ccmp.rx_pn[rx->u.rx.queue]; printk(KERN_DEBUG "%s: CCMP replay detected for RX frame from " MACSTR " (RX PN %02x%02x%02x%02x%02x%02x <= prev. PN " @@ -794,7 +794,7 @@ ieee80211_rx_h_ccmp_decrypt(struct ieee8 MAC2STR(rx->sta->addr), pn[0], pn[1], pn[2], pn[3], pn[4], pn[5], ppn[0], ppn[1], ppn[2], ppn[3], ppn[4], ppn[5]); -#endif /* IEEE80211_DEBUG */ +#endif /* CONFIG_IEEE80211_DEBUG */ key->u.ccmp.replays++; return TXRX_DROP; } Index: netdev/net/ieee80211/sta_info.h =================================================================== --- netdev.orig/net/ieee80211/sta_info.h 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/sta_info.h 2005-10-12 17:50:07.000000000 +0200 @@ -95,10 +95,10 @@ struct sta_info { u32 wpa_trigger; #endif /* CONFIG_HOSTAPD_WPA_TESTING */ -#ifdef IEEE80211_DEBUG_COUNTERS +#ifdef CONFIG_IEEE80211_DEBUG_COUNTERS unsigned int wme_rx_queue[NUM_RX_DATA_QUEUES]; unsigned int wme_tx_queue[NUM_RX_DATA_QUEUES]; -#endif /* IEEE80211_DEBUG_COUNTERS */ +#endif /* CONFIG_IEEE80211_DEBUG_COUNTERS */ int vlan_id; }; Index: netdev/net/ieee80211/wme.c =================================================================== --- netdev.orig/net/ieee80211/wme.c 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/wme.c 2005-10-12 17:50:07.000000000 +0200 @@ -13,7 +13,7 @@ #include #include -#include "ieee80211.h" +#include #include "ieee80211_i.h" #include "wme.h" @@ -45,12 +45,12 @@ ieee80211_rx_h_parse_qos(struct ieee8021 tid = 0; /* 802.1d - Best Effort */ } } -#ifdef IEEE80211_DEBUG_COUNTERS +#ifdef CONFIG_IEEE80211_DEBUG_COUNTERS I802_DEBUG_INC(rx->local->wme_rx_queue[tid]); if (rx->sta) { I802_DEBUG_INC(rx->sta->wme_rx_queue[tid]); } -#endif /* IEEE80211_DEBUG_COUNTERS */ +#endif /* CONFIG_IEEE80211_DEBUG_COUNTERS */ rx->u.rx.queue = tid; /* Set skb->priority to 1d tag if highest order bit of TID is not set. Index: netdev/net/ieee80211/ieee80211_proc.c =================================================================== --- netdev.orig/net/ieee80211/ieee80211_proc.c 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/ieee80211_proc.c 2005-10-12 18:06:45.000000000 +0200 @@ -15,12 +15,12 @@ #ifdef CONFIG_PROC_FS -#include "ieee80211.h" +#include +#include +#include #include "ieee80211_i.h" -#include "ieee80211_common.h" #include "sta_info.h" #include "ieee80211_proc.h" -#include "ieee802_11_mgmt.h" #include "rate_control.h" @@ -118,11 +118,11 @@ static char * ieee80211_proc_sub_if_sta( "state=%d\n" "bssid=" MACSTR "\n" "prev_bssid=" MACSTR "\n" - "ssid_len=%d\n" + "ssid_len=%zd\n" "aid=%d\n" "ap_capab=0x%x\n" "capab=0x%x\n" - "extra_ie_len=%d\n" + "extra_ie_len=%zd\n" "auth_tries=%d\n" "assoc_tries=%d\n" "flags=%s%s%s%s%s%s%s\n" @@ -288,7 +288,7 @@ static int ieee80211_proc_sta_read(char p += sprintf(p, "inactive_msec=%d\n", JIFFIES2MSEC(inactive)); p += sprintf(p, "channel_use=%d\n", sta->channel_use); p += sprintf(p, "wep_weak_iv_count=%d\n", sta->wep_weak_iv_count); -#ifdef IEEE80211_DEBUG_COUNTERS +#ifdef CONFIG_IEEE80211_DEBUG_COUNTERS p += sprintf(p, "wme_rx_queue="); for (i = 0; i < NUM_RX_DATA_QUEUES; i++) p += sprintf(p, "%u ", sta->wme_rx_queue[i]); @@ -298,7 +298,7 @@ static int ieee80211_proc_sta_read(char for (i = 0; i < NUM_RX_DATA_QUEUES; i++) p += sprintf(p, "%u ", sta->wme_tx_queue[i]); p += sprintf(p, "\n"); -#endif /* IEEE80211_DEBUG_COUNTERS */ +#endif /* CONFIG_IEEE80211_DEBUG_COUNTERS */ p += sprintf(p, "last_seq_ctrl="); for (i = 0; i < NUM_RX_DATA_QUEUES; i++) { p += sprintf(p, "%x ", sta->last_seq_ctrl[i]); @@ -375,7 +375,7 @@ static int ieee80211_proc_debug_read(cha return 0; } -#ifdef IEEE80211_DEBUG_COUNTERS +#ifdef CONFIG_IEEE80211_DEBUG_COUNTERS p += sprintf(p, "tx_handlers_drop=%u\n" "tx_handlers_queued=%u\n" @@ -429,7 +429,7 @@ static int ieee80211_proc_debug_read(cha p += sprintf(p, " %u", local->wme_tx_queue[i]); p += sprintf(p, "\n"); } -#endif /* IEEE80211_DEBUG_COUNTERS */ +#endif /* CONFIG_IEEE80211_DEBUG_COUNTERS */ p += sprintf(p, "num_scans=%u\n", local->scan.num_scans); Index: netdev/net/ieee80211/ieee80211.c =================================================================== --- netdev.orig/net/ieee80211/ieee80211.c 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/ieee80211.c 2005-10-12 17:51:52.000000000 +0200 @@ -27,16 +27,16 @@ #endif /* WIRELESS_EXT > 12 */ #include -#include "ieee80211.h" +#include +#include +#include #include "ieee80211_i.h" -#include "ieee80211_common.h" #include "ieee80211_proc.h" #include "rate_control.h" #include "wep.h" #include "wpa.h" #include "tkip.h" #include "wme.h" -#include "ieee802_11_mgmt.h" #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,47)) @@ -855,10 +855,10 @@ ieee80211_tx_h_rate_limit(struct ieee802 static ieee80211_txrx_result ieee80211_tx_h_check_assoc(struct ieee80211_txrx_data *tx) { -#ifdef IEEE80211_VERBOSE_DEBUG +#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG struct sk_buff *skb = tx->skb; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; -#endif /* IEEE80211_VERBOSE_DEBUG */ +#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ u32 sta_flags; if (unlikely(tx->local->sta_scanning != 0) && @@ -875,11 +875,11 @@ ieee80211_tx_h_check_assoc(struct ieee80 if (unlikely(!(sta_flags & WLAN_STA_ASSOC) && tx->local->conf.mode != IW_MODE_ADHOC && WLAN_FC_GET_TYPE(tx->fc) == WLAN_FC_TYPE_DATA)) { -#ifdef IEEE80211_VERBOSE_DEBUG +#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG printk(KERN_DEBUG "%s: dropped data frame to not " "associated station " MACSTR "\n", tx->dev->name, MAC2STR(hdr->addr1)); -#endif /* IEEE80211_VERBOSE_DEBUG */ +#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc); return TXRX_DROP; } @@ -899,7 +899,7 @@ ieee80211_tx_h_check_assoc(struct ieee80 if (unlikely(!tx->u.tx.mgmt_interface && tx->sdata->ieee802_1x && !(sta_flags & WLAN_STA_AUTHORIZED))) { -#ifdef IEEE80211_DEBUG +#ifdef CONFIG_IEEE80211_DEBUG struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data; printk(KERN_DEBUG "%s: dropped frame to " MACSTR @@ -1608,11 +1608,11 @@ struct sk_buff * ieee80211_beacon_get(st spin_unlock_bh(&local->sub_if_lock); if (bdev == NULL || norm == NULL || norm->beacon_head == NULL) { -#ifdef IEEE80211_VERBOSE_DEBUG +#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG if (net_ratelimit()) printk(KERN_DEBUG "no beacon data avail for idx=%d " "(%s)\n", bss_idx, bdev ? bdev->name : "N/A"); -#endif /* IEEE80211_VERBOSE_DEBUG */ +#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ return NULL; } @@ -1738,11 +1738,11 @@ int ieee80211_hw_config(struct net_devic struct ieee80211_local *local = dev->priv; int i, ret = 0; -#ifdef IEEE80211_VERBOSE_DEBUG +#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG printk(KERN_DEBUG "HW CONFIG: channel=%d freq=%d mode=%d " "phymode=%d\n", local->conf.channel, local->conf.freq, local->conf.mode, local->conf.phymode); -#endif /* IEEE80211_VERBOSE_DEBUG */ +#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ if (local->hw->config) ret = local->hw->config(dev, &local->conf); @@ -1781,9 +1781,9 @@ static int ieee80211_change_mtu(struct n return -EINVAL; } -#ifdef IEEE80211_VERBOSE_DEBUG +#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG printk(KERN_DEBUG "%s: setting MTU %d\n", dev->name, new_mtu); -#endif /* IEEE80211_VERBOSE_DEBUG */ +#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ dev->mtu = new_mtu; return 0; } @@ -1799,9 +1799,9 @@ static int ieee80211_change_mtu_apdev(st return -EINVAL; } -#ifdef IEEE80211_VERBOSE_DEBUG +#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG printk(KERN_DEBUG "%s: setting MTU %d\n", dev->name, new_mtu); -#endif /* IEEE80211_VERBOSE_DEBUG */ +#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ dev->mtu = new_mtu; return 0; } @@ -2516,7 +2516,7 @@ ieee80211_reassemble_add(struct ieee8021 local->fragment_next = 0; if (entry->skb) { -#ifdef IEEE80211_DEBUG +#ifdef CONFIG_IEEE80211_DEBUG struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) entry->skb->data; printk(KERN_DEBUG "%s: RX reassembly removed oldest " @@ -2526,7 +2526,7 @@ ieee80211_reassemble_add(struct ieee8021 jiffies - entry->first_frag_time, entry->seq, entry->last_frag, MAC2STR(hdr->addr1), MAC2STR(hdr->addr2)); -#endif /* IEEE80211_DEBUG */ +#endif /* CONFIG_IEEE80211_DEBUG */ dev_kfree_skb(entry->skb); } @@ -2960,13 +2960,13 @@ ieee80211_rx_h_802_1x_pae(struct ieee802 WLAN_FC_GET_STYPE(rx->fc) != WLAN_FC_STYPE_NULLFUNC && (!rx->sta || !(rx->sta->flags & WLAN_STA_AUTHORIZED)) && !ieee80211_is_eapol(rx->skb))) { -#ifdef IEEE80211_DEBUG +#ifdef CONFIG_IEEE80211_DEBUG struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) rx->skb->data; printk(KERN_DEBUG "%s: dropped frame from " MACSTR " (unauthorized port)\n", rx->dev->name, MAC2STR(hdr->addr2)); -#endif /* IEEE80211_DEBUG */ +#endif /* CONFIG_IEEE80211_DEBUG */ return TXRX_DROP; } @@ -3967,11 +3967,11 @@ int ieee80211_if_add_wds(struct net_devi sdata->type = IEEE80211_SUB_IF_TYPE_WDS; memcpy(&sdata->u.wds, wds, sizeof(struct ieee80211_if_wds)); -#ifdef IEEE80211_VERBOSE_DEBUG +#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG printk(KERN_DEBUG "%s: Added WDS Link to " MACSTR "\n", wds_dev->name, MAC2STR(sdata->u.wds.remote_addr)); -#endif /* IEEE80211_VERBOSE_DEBUG */ +#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ ieee80211_proc_init_virtual(wds_dev); @@ -4251,10 +4251,10 @@ static void ieee80211_if_del(struct ieee sta_info_release(local, sta); sta_info_free(local, sta, 0); } else { -#ifdef IEEE80211_VERBOSE_DEBUG +#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG printk(KERN_DEBUG "%s: Someone had deleted my STA " - "entry for the WDS link\n", name); -#endif /* IEEE80211_VERBOSE_DEBUG */ + "entry for the WDS link\n", sdata->dev->name); +#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ } break; case IEEE80211_SUB_IF_TYPE_STA: Index: netdev/net/ieee80211/Kconfig =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ netdev/net/ieee80211/Kconfig 2005-10-12 17:50:07.000000000 +0200 @@ -0,0 +1,32 @@ +config IEEE80211 + tristate "Generic IEEE 802.11 Networking Stack" + ---help--- + This option enables the hardware independent IEEE 802.11 + networking stack. + +config IEEE80211_DEBUG + bool "Enable debugging output" + depends on IEEE80211 + ---help--- + This option will enable debug tracing output for the + ieee80211 network stack. + + If you are not trying to debug or develop the ieee80211 + subsystem, you most likely want to say N here. + +config IEEE80211_VERBOSE_DEBUG + bool "Verbose debugging output" + depends on IEEE80211_DEBUG + +config TKIP_DEBUG + bool "TKIP debugging" + depends on IEEE80211_DEBUG + +config IEEE80211_DEBUG_COUNTERS + bool "Extra statistics for TX/RX debugging" + depends on IEEE80211_DEBUG + +config HOSTAPD_WPA_TESTING + bool "Support for TKIP countermeasures testing" + depends on IEEE80211_DEBUG + Index: netdev/net/ieee80211/sta_info.c =================================================================== --- netdev.orig/net/ieee80211/sta_info.c 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/sta_info.c 2005-10-12 17:56:51.000000000 +0200 @@ -16,7 +16,7 @@ #include #include -#include "ieee80211.h" +#include #include "ieee80211_i.h" #include "ieee80211_proc.h" #include "rate_control.h" @@ -160,10 +160,10 @@ struct sta_info * sta_info_add(struct ie local->hw->sta_table_notification(local->mdev, local->num_sta); sta->key_idx_compression = HW_KEY_IDX_INVALID; -#ifdef IEEE80211_VERBOSE_DEBUG +#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG printk(KERN_DEBUG "%s: Added STA " MACSTR "\n", - local->dev->name, MAC2STR(addr)); -#endif /* IEEE80211_VERBOSE_DEBUG */ + dev->name, MAC2STR(addr)); +#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ if (!in_interrupt()) { ieee80211_proc_init_sta(local, sta); @@ -232,10 +232,10 @@ void sta_info_free(struct ieee80211_loca sta->key_idx_compression = HW_KEY_IDX_INVALID; } -#ifdef IEEE80211_VERBOSE_DEBUG +#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG printk(KERN_DEBUG "%s: Removed STA " MACSTR "\n", - local->dev->name, MAC2STR(sta->addr)); -#endif /* IEEE80211_VERBOSE_DEBUG */ + local->mdev->name, MAC2STR(sta->addr)); +#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ ieee80211_proc_deinit_sta(local, sta); Index: netdev/net/ieee80211/ieee80211_i.h =================================================================== --- netdev.orig/net/ieee80211/ieee80211_i.h 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/ieee80211_i.h 2005-10-12 17:50:07.000000000 +0200 @@ -557,7 +557,7 @@ struct ieee80211_local { int rate_ctrl_num_up, rate_ctrl_num_down; -#ifdef IEEE80211_DEBUG_COUNTERS +#ifdef CONFIG_IEEE80211_DEBUG_COUNTERS /* TX/RX handler statistics */ unsigned int tx_handlers_drop; unsigned int tx_handlers_queued; @@ -582,9 +582,9 @@ struct ieee80211_local { unsigned int wme_rx_queue[NUM_RX_DATA_QUEUES]; unsigned int wme_tx_queue[NUM_RX_DATA_QUEUES]; #define I802_DEBUG_INC(c) (c)++ -#else /* IEEE80211_DEBUG_COUNTERS */ +#else /* CONFIG_IEEE80211_DEBUG_COUNTERS */ #define I802_DEBUG_INC(c) do { } while (0) -#endif /* IEEE80211_DEBUG_COUNTERS */ +#endif /* CONFIG_IEEE80211_DEBUG_COUNTERS */ int default_wep_only; /* only default WEP keys are used with this Index: netdev/net/ieee80211/ieee80211_scan.c =================================================================== --- netdev.orig/net/ieee80211/ieee80211_scan.c 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/ieee80211_scan.c 2005-10-12 17:50:07.000000000 +0200 @@ -14,7 +14,7 @@ #include #include -#include "ieee80211.h" +#include #include "ieee80211_i.h" #include "rate_control.h" @@ -231,14 +231,14 @@ static void ieee80211_scan_stop(struct n local->hw->passive_scan(dev, IEEE80211_SCAN_END, conf); -#ifdef IEEE80211_VERBOSE_DEBUG +#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG printk(KERN_DEBUG "%s: Did scan on mode: %d freq: %d chan: %d " "GOT: %d Beacon: %d (%d)\n", dev->name, mode->mode, chan->freq, chan->chan, local->scan.rx_packets, local->scan.rx_beacon, local->scan.tries); -#endif /* IEEE80211_VERBOSE_DEBUG */ +#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ local->scan.num_scans++; local->scan.in_scan = 0; Index: netdev/net/ieee80211/ieee80211_ioctl.c =================================================================== --- netdev.orig/net/ieee80211/ieee80211_ioctl.c 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/ieee80211_ioctl.c 2005-10-12 17:55:21.000000000 +0200 @@ -22,13 +22,13 @@ #endif /* WIRELESS_EXT > 12 */ #include -#include "ieee80211.h" +#include +#include #include "ieee80211_i.h" #include "hostapd_ioctl.h" #include "rate_control.h" #include "wpa.h" #include "aes_ccm.h" -#include "ieee802_11_mgmt.h" #if WIRELESS_EXT <= 12 @@ -540,11 +540,11 @@ static int ieee80211_ioctl_set_encryptio sta = sta_info_get(local, param->sta_addr); if (sta == NULL) { param->u.crypt.err = HOSTAP_CRYPT_ERR_UNKNOWN_ADDR; -#ifdef IEEE80211_VERBOSE_DEBUG +#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG printk(KERN_DEBUG "%s: set_encrypt - unknown addr " MACSTR "\n", dev->name, MAC2STR(param->sta_addr)); -#endif /* IEEE80211_VERBOSE_DEBUG */ +#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ return -ENOENT; } @@ -2682,7 +2682,7 @@ static int ieee80211_ioctl_giwpriv(struc { if (!data->pointer || - verify_area(VERIFY_WRITE, data->pointer, + !access_ok(VERIFY_WRITE, data->pointer, sizeof(ieee80211_ioctl_priv))) return -EINVAL; @@ -2739,10 +2739,11 @@ int ieee80211_ioctl(struct net_device *d case SIOCGIWRANGE: { struct iw_range range; - ret = verify_area(VERIFY_WRITE, wrq->u.data.pointer, - sizeof(range)); - if (ret) + if (!access_ok(VERIFY_WRITE, wrq->u.data.pointer, + sizeof(range))) { + ret = -EFAULT; break; + } ret = ieee80211_ioctl_giwrange(dev, NULL, &wrq->u.data, (char *) &range); if (ret) Index: netdev/net/ieee80211/ieee80211_sta.c =================================================================== --- netdev.orig/net/ieee80211/ieee80211_sta.c 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/ieee80211_sta.c 2005-10-12 18:08:20.000000000 +0200 @@ -29,9 +29,9 @@ #include #include -#include "ieee80211.h" +#include +#include #include "ieee80211_i.h" -#include "ieee802_11_mgmt.h" #include "rate_control.h" #include "hostapd_ioctl.h" @@ -876,7 +876,7 @@ static void ieee80211_rx_mgmt_auth(struc } if (len < 24 + 6) { - printk(KERN_DEBUG "%s: too short (%d) authentication frame " + printk(KERN_DEBUG "%s: too short (%zd) authentication frame " "received from " MACSTR " - ignored\n", dev->name, len, MAC2STR(mgmt->sa)); return; @@ -997,7 +997,7 @@ static void ieee80211_rx_mgmt_deauth(str u16 reason_code; if (len < 24 + 2) { - printk(KERN_DEBUG "%s: too short (%d) deauthentication frame " + printk(KERN_DEBUG "%s: too short (%zd) deauthentication frame " "received from " MACSTR " - ignored\n", dev->name, len, MAC2STR(mgmt->sa)); return; @@ -1043,7 +1043,7 @@ static void ieee80211_rx_mgmt_disassoc(s u16 reason_code; if (len < 24 + 2) { - printk(KERN_DEBUG "%s: too short (%d) disassociation frame " + printk(KERN_DEBUG "%s: too short (%zd) disassociation frame " "received from " MACSTR " - ignored\n", dev->name, len, MAC2STR(mgmt->sa)); return; @@ -1102,7 +1102,7 @@ static void ieee80211_rx_mgmt_assoc_resp } if (len < 24 + 6) { - printk(KERN_DEBUG "%s: too short (%d) association frame " + printk(KERN_DEBUG "%s: too short (%zd) association frame " "received from " MACSTR " - ignored\n", dev->name, len, MAC2STR(mgmt->sa)); return; @@ -1707,7 +1707,7 @@ static void ieee80211_rx_mgmt_probe_req( resp = (struct ieee80211_mgmt *) skb->data; memcpy(resp->da, mgmt->sa, ETH_ALEN); -#if IEEE80211_IBSS_DEBUG +#ifdef IEEE80211_IBSS_DEBUG printk(KERN_DEBUG "%s: Sending ProbeResp to " MACSTR "\n", dev->name, MAC2STR(resp->da)); #endif /* IEEE80211_IBSS_DEBUG */ Index: netdev/net/ieee80211/fifo_qdisc.c =================================================================== --- netdev.orig/net/ieee80211/fifo_qdisc.c 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/fifo_qdisc.c 2005-10-12 17:50:07.000000000 +0200 @@ -13,7 +13,7 @@ #include #include #include -#include "ieee80211.h" +#include #include "ieee80211_i.h" #include "wme.h" Index: netdev/net/ieee80211/wep.c =================================================================== --- netdev.orig/net/ieee80211/wep.c 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/wep.c 2005-10-12 17:50:07.000000000 +0200 @@ -15,7 +15,7 @@ #include #include -#include "ieee80211.h" +#include #include "ieee80211_i.h" #include "wep.h" Index: netdev/net/ieee80211/aes_ccm.c =================================================================== --- netdev.orig/net/ieee80211/aes_ccm.c 2005-10-12 16:45:29.000000000 +0200 +++ netdev/net/ieee80211/aes_ccm.c 2005-10-12 17:50:07.000000000 +0200 @@ -10,7 +10,7 @@ #include #include -#include "ieee80211.h" +#include #include "ieee80211_key.h" #include "aes_ccm.h"