* [PATCH 01/20] mac80211: fix showing transmitted frames on multiple monitor interfaces
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-15 14:49 ` [PATCH 02/20] mac80211: remove ieee80211_msg_wep_frame_unknown_key Johannes Berg
` (18 subsequent siblings)
19 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
Signed-off-by: Johannes Berg <johannes@sipsolutions.net
---
net/mac80211/ieee80211.c | 1 -
1 file changed, 1 deletion(-)
--- wireless-dev.orig/net/mac80211/ieee80211.c 2007-08-15 13:39:27.816520121 +0200
+++ wireless-dev/net/mac80211/ieee80211.c 2007-08-15 13:39:40.476520121 +0200
@@ -1190,7 +1190,6 @@ void ieee80211_tx_status(struct ieee8021
memset(skb->cb, 0, sizeof(skb->cb));
netif_rx(skb);
skb = skb2;
- break;
}
}
out:
--
^ permalink raw reply [flat|nested] 43+ messages in thread* [PATCH 02/20] mac80211: remove ieee80211_msg_wep_frame_unknown_key
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
2007-08-15 14:49 ` [PATCH 01/20] mac80211: fix showing transmitted frames on multiple monitor interfaces Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-15 14:49 ` [PATCH 03/20] mac80211: remove radar stuff Johannes Berg
` (17 subsequent siblings)
19 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
Neither hostapd nor wpa_supplicant really use it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/ieee80211_common.h | 2 +-
net/mac80211/rx.c | 11 +++++------
2 files changed, 6 insertions(+), 7 deletions(-)
--- wireless-dev.orig/net/mac80211/rx.c 2007-08-15 13:39:27.226520121 +0200
+++ wireless-dev/net/mac80211/rx.c 2007-08-15 13:39:42.366520121 +0200
@@ -350,12 +350,11 @@ ieee80211_rx_h_load_key(struct ieee80211
MAC_ARG(hdr->addr1),
MAC_ARG(hdr->addr2),
MAC_ARG(hdr->addr3));
- if (!rx->local->apdev)
- return TXRX_DROP;
- ieee80211_rx_mgmt(
- rx->local, rx->skb, rx->u.rx.status,
- ieee80211_msg_wep_frame_unknown_key);
- return TXRX_QUEUED;
+ /*
+ * TODO: notify userspace about this
+ * via cfg/nl80211
+ */
+ return TXRX_DROP;
}
}
}
--- wireless-dev.orig/net/mac80211/ieee80211_common.h 2007-08-15 13:39:27.256520121 +0200
+++ wireless-dev/net/mac80211/ieee80211_common.h 2007-08-15 13:39:42.366520121 +0200
@@ -48,7 +48,7 @@ enum ieee80211_msg_type {
ieee80211_msg_tx_callback_ack = 1,
ieee80211_msg_tx_callback_fail = 2,
/* hole at 3, was ieee80211_msg_passive_scan but unused */
- ieee80211_msg_wep_frame_unknown_key = 4,
+ /* hole at 4, was ieee80211_msg_wep_frame_unknown_key but now unused */
ieee80211_msg_michael_mic_failure = 5,
/* hole at 6, was monitor but never sent to userspace */
ieee80211_msg_sta_not_assoc = 7,
--
^ permalink raw reply [flat|nested] 43+ messages in thread* [PATCH 03/20] mac80211: remove radar stuff
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
2007-08-15 14:49 ` [PATCH 01/20] mac80211: fix showing transmitted frames on multiple monitor interfaces Johannes Berg
2007-08-15 14:49 ` [PATCH 02/20] mac80211: remove ieee80211_msg_wep_frame_unknown_key Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-15 14:49 ` [PATCH 04/20] cfg80211: extend radiotap parser by all remaining fields Johannes Berg
` (16 subsequent siblings)
19 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
Unused in drivers, userspace and mac80211.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
include/net/mac80211.h | 6 ------
net/mac80211/ieee80211.c | 28 ----------------------------
net/mac80211/ieee80211_common.h | 2 +-
3 files changed, 1 insertion(+), 35 deletions(-)
--- wireless-dev.orig/include/net/mac80211.h 2007-08-15 14:04:48.196516958 +0200
+++ wireless-dev/include/net/mac80211.h 2007-08-15 14:07:04.636516958 +0200
@@ -1038,12 +1038,6 @@ ieee80211_get_mc_list_item(struct ieee80
/* called by driver to notify scan status completed */
void ieee80211_scan_completed(struct ieee80211_hw *hw);
-/* Function to indicate Radar Detection. The low level driver must call this
- * function to indicate the presence of radar in the current channel.
- * Additionally the radar type also could be sent */
-int ieee80211_radar_status(struct ieee80211_hw *hw, int channel,
- int radar, int radar_type);
-
/* return a pointer to the source address (SA) */
static inline u8 *ieee80211_get_SA(struct ieee80211_hdr *hdr)
{
--- wireless-dev.orig/net/mac80211/ieee80211.c 2007-08-15 14:06:33.976516958 +0200
+++ wireless-dev/net/mac80211/ieee80211.c 2007-08-15 14:07:04.636516958 +0200
@@ -201,34 +201,6 @@ ieee80211_rx_mgmt(struct ieee80211_local
netif_rx(skb);
}
-int ieee80211_radar_status(struct ieee80211_hw *hw, int channel,
- int radar, int radar_type)
-{
- struct sk_buff *skb;
- struct ieee80211_radar_info *msg;
- struct ieee80211_local *local = hw_to_local(hw);
-
- if (!local->apdev)
- return 0;
-
- skb = dev_alloc_skb(sizeof(struct ieee80211_frame_info) +
- sizeof(struct ieee80211_radar_info));
-
- if (!skb)
- return -ENOMEM;
- skb_reserve(skb, sizeof(struct ieee80211_frame_info));
-
- msg = (struct ieee80211_radar_info *)
- skb_put(skb, sizeof(struct ieee80211_radar_info));
- msg->channel = channel;
- msg->radar = radar;
- msg->radar_type = radar_type;
-
- ieee80211_rx_mgmt(local, skb, NULL, ieee80211_msg_radar);
- return 0;
-}
-EXPORT_SYMBOL(ieee80211_radar_status);
-
void ieee80211_key_threshold_notify(struct net_device *dev,
struct ieee80211_key *key,
struct sta_info *sta)
--- wireless-dev.orig/net/mac80211/ieee80211_common.h 2007-08-15 14:06:34.006516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_common.h 2007-08-15 14:07:04.636516958 +0200
@@ -54,7 +54,7 @@ enum ieee80211_msg_type {
ieee80211_msg_sta_not_assoc = 7,
/* 8 was ieee80211_msg_set_aid_for_sta */
ieee80211_msg_key_threshold_notification = 9,
- ieee80211_msg_radar = 11,
+ /* 11 was ieee80211_msg_radar */
};
struct ieee80211_msg_key_notification {
--
^ permalink raw reply [flat|nested] 43+ messages in thread* [PATCH 04/20] cfg80211: extend radiotap parser by all remaining fields
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (2 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 03/20] mac80211: remove radar stuff Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-15 14:49 ` [PATCH 05/20] mac80211: remove unused ioctls (1) Johannes Berg
` (15 subsequent siblings)
19 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
These fields are defined so the parser might as well understand them.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/wireless/radiotap.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- wireless-dev.orig/net/wireless/radiotap.c 2007-08-15 13:39:24.786520121 +0200
+++ wireless-dev/net/wireless/radiotap.c 2007-08-15 13:39:47.946520121 +0200
@@ -161,7 +161,11 @@ int ieee80211_radiotap_iterator_next(
[IEEE80211_RADIOTAP_DBM_TX_POWER] = 0x11,
[IEEE80211_RADIOTAP_ANTENNA] = 0x11,
[IEEE80211_RADIOTAP_DB_ANTSIGNAL] = 0x11,
- [IEEE80211_RADIOTAP_DB_ANTNOISE] = 0x11
+ [IEEE80211_RADIOTAP_DB_ANTNOISE] = 0x11,
+ [IEEE80211_RADIOTAP_RX_FLAGS] = 0x22,
+ [IEEE80211_RADIOTAP_TX_FLAGS] = 0x22,
+ [IEEE80211_RADIOTAP_RTS_RETRIES] = 0x11,
+ [IEEE80211_RADIOTAP_DATA_RETRIES] = 0x11,
/*
* add more here as they are defined in
* include/net/ieee80211_radiotap.h
--
^ permalink raw reply [flat|nested] 43+ messages in thread* [PATCH 05/20] mac80211: remove unused ioctls (1)
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (3 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 04/20] cfg80211: extend radiotap parser by all remaining fields Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-18 4:04 ` Jouni Malinen
2007-08-15 14:49 ` [PATCH 06/20] mac80211: remove PRISM2_PARAM_RADIO_ENABLED Johannes Berg
` (14 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
The ioctls
* PRISM2_PARAM_WIFI_WME_NOACK_TEST
* PRISM2_PARAM_HOST_ENCRYPT
* PRISM2_PARAM_HOST_DECRYPT
* PRISM2_PARAM_ANTENNA_MODE
* PRISM2_PARAM_STAT_TIME
* PRISM2_PARAM_SCAN_FLAGS
are not used by hostapd or wpa_supplicant.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
include/net/mac80211.h | 3 --
net/mac80211/hostapd_ioctl.h | 6 ----
net/mac80211/ieee80211.c | 42 -------------------------------
net/mac80211/ieee80211_i.h | 7 -----
net/mac80211/ieee80211_ioctl.c | 54 -----------------------------------------
net/mac80211/ieee80211_sta.c | 37 ----------------------------
net/mac80211/wme.c | 3 --
7 files changed, 152 deletions(-)
--- wireless-dev.orig/net/mac80211/hostapd_ioctl.h 2007-08-15 14:04:46.766516958 +0200
+++ wireless-dev/net/mac80211/hostapd_ioctl.h 2007-08-15 14:07:46.456516958 +0200
@@ -28,8 +28,6 @@ enum {
PRISM2_PARAM_BEACON_INT = 3,
PRISM2_PARAM_AP_BRIDGE_PACKETS = 10,
PRISM2_PARAM_DTIM_PERIOD = 11,
- PRISM2_PARAM_HOST_ENCRYPT = 17,
- PRISM2_PARAM_HOST_DECRYPT = 18,
PRISM2_PARAM_IEEE_802_1X = 23,
/* Instant802 additions */
@@ -38,19 +36,15 @@ enum {
PRISM2_PARAM_SHORT_SLOT_TIME = 1006,
PRISM2_PARAM_NEXT_MODE = 1008,
PRISM2_PARAM_RADIO_ENABLED = 1010,
- PRISM2_PARAM_ANTENNA_MODE = 1013,
PRISM2_PARAM_PRIVACY_INVOKED = 1014,
PRISM2_PARAM_BROADCAST_SSID = 1015,
- PRISM2_PARAM_STAT_TIME = 1016,
PRISM2_PARAM_STA_ANTENNA_SEL = 1017,
PRISM2_PARAM_TX_POWER_REDUCTION = 1022,
PRISM2_PARAM_EAPOL = 1023,
PRISM2_PARAM_KEY_TX_RX_THRESHOLD = 1024,
PRISM2_PARAM_KEY_INDEX = 1025,
PRISM2_PARAM_DEFAULT_WEP_ONLY = 1026,
- PRISM2_PARAM_WIFI_WME_NOACK_TEST = 1033,
PRISM2_PARAM_ALLOW_BROADCAST_ALWAYS = 1034,
- PRISM2_PARAM_SCAN_FLAGS = 1035,
PRISM2_PARAM_HW_MODES = 1036,
PRISM2_PARAM_CREATE_IBSS = 1037,
PRISM2_PARAM_WMM_ENABLED = 1038,
--- wireless-dev.orig/net/mac80211/ieee80211_i.h 2007-08-15 14:04:47.366516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_i.h 2007-08-15 14:07:46.456516958 +0200
@@ -553,10 +553,6 @@ struct ieee80211_local {
struct list_head sta_bss_list;
struct ieee80211_sta_bss *sta_bss_hash[STA_HASH_SIZE];
spinlock_t sta_bss_lock;
-#define IEEE80211_SCAN_MATCH_SSID BIT(0)
-#define IEEE80211_SCAN_WPA_ONLY BIT(1)
-#define IEEE80211_SCAN_EXTRA_INFO BIT(2)
- int scan_flags;
#ifdef CONFIG_HOSTAPD_WPA_TESTING
#define WPA_TRIGGER_FAIL_TX_MIC BIT(0)
@@ -590,8 +586,6 @@ struct ieee80211_local {
u32 channel_use;
u32 channel_use_raw;
- u32 stat_time;
- struct timer_list stat_timer;
#ifdef CONFIG_MAC80211_DEBUGFS
struct work_struct sta_debugfs_add;
@@ -642,7 +636,6 @@ struct ieee80211_local {
* even when there are no associated STAs
*/
- int wifi_wme_noack_test;
unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */
unsigned int enabled_modes; /* bitfield of allowed modes;
--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:04:46.796516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:07:46.476516958 +0200
@@ -1792,7 +1792,6 @@ static int ieee80211_ioctl_siwscan(struc
struct iw_request_info *info,
struct iw_point *data, char *extra)
{
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
u8 *ssid = NULL;
size_t ssid_len = 0;
@@ -1803,16 +1802,7 @@ static int ieee80211_ioctl_siwscan(struc
switch (sdata->type) {
case IEEE80211_IF_TYPE_STA:
case IEEE80211_IF_TYPE_IBSS:
- if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) {
- ssid = sdata->u.sta.ssid;
- ssid_len = sdata->u.sta.ssid_len;
- }
- break;
case IEEE80211_IF_TYPE_AP:
- if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) {
- ssid = sdata->u.ap.ssid;
- ssid_len = sdata->u.ap.ssid_len;
- }
break;
default:
return -EOPNOTSUPP;
@@ -2145,12 +2135,6 @@ static int ieee80211_ioctl_prism2_param(
sdata = IEEE80211_DEV_TO_SUB_IF(dev);
switch (param) {
- case PRISM2_PARAM_HOST_ENCRYPT:
- case PRISM2_PARAM_HOST_DECRYPT:
- /* TODO: implement these; return success now to prevent
- * hostapd from aborting */
- break;
-
case PRISM2_PARAM_BEACON_INT:
local->hw.conf.beacon_int = value;
if (ieee80211_hw_config(local))
@@ -2199,15 +2183,6 @@ static int ieee80211_ioctl_prism2_param(
}
break;
- case PRISM2_PARAM_STAT_TIME:
- if (!local->stat_time && value) {
- local->stat_timer.expires = jiffies + HZ * value / 100;
- add_timer(&local->stat_timer);
- } else if (local->stat_time && !value) {
- del_timer_sync(&local->stat_timer);
- }
- local->stat_time = value;
- break;
case PRISM2_PARAM_SHORT_SLOT_TIME:
if (value)
local->hw.conf.flags |= IEEE80211_CONF_SHORT_SLOT_TIME;
@@ -2231,12 +2206,6 @@ static int ieee80211_ioctl_prism2_param(
ret = ieee80211_ioctl_set_radio_enabled(dev, value);
break;
- case PRISM2_PARAM_ANTENNA_MODE:
- local->hw.conf.antenna_mode = value;
- if (ieee80211_hw_config(local))
- ret = -EINVAL;
- break;
-
case PRISM2_PARAM_BROADCAST_SSID:
if ((value < 0) || (value > 1))
ret = -EINVAL;
@@ -2278,18 +2247,10 @@ static int ieee80211_ioctl_prism2_param(
ret = ieee80211_ioctl_default_wep_only(local, value);
break;
- case PRISM2_PARAM_WIFI_WME_NOACK_TEST:
- local->wifi_wme_noack_test = value;
- break;
-
case PRISM2_PARAM_ALLOW_BROADCAST_ALWAYS:
local->allow_broadcast_always = value;
break;
- case PRISM2_PARAM_SCAN_FLAGS:
- local->scan_flags = value;
- break;
-
case PRISM2_PARAM_MIXED_CELL:
if (sdata->type != IEEE80211_IF_TYPE_STA &&
sdata->type != IEEE80211_IF_TYPE_IBSS)
@@ -2389,9 +2350,6 @@ static int ieee80211_ioctl_get_prism2_pa
*param = sdata->short_preamble;
break;
- case PRISM2_PARAM_STAT_TIME:
- *param = local->stat_time;
- break;
case PRISM2_PARAM_SHORT_SLOT_TIME:
*param = !!(local->hw.conf.flags & IEEE80211_CONF_SHORT_SLOT_TIME);
break;
@@ -2400,10 +2358,6 @@ static int ieee80211_ioctl_get_prism2_pa
*param = local->next_mode;
break;
- case PRISM2_PARAM_ANTENNA_MODE:
- *param = local->hw.conf.antenna_mode;
- break;
-
case PRISM2_PARAM_BROADCAST_SSID:
*param = !!(local->hw.conf.flags & IEEE80211_CONF_SSID_HIDDEN);
break;
@@ -2443,18 +2397,10 @@ static int ieee80211_ioctl_get_prism2_pa
*param = local->default_wep_only;
break;
- case PRISM2_PARAM_WIFI_WME_NOACK_TEST:
- *param = local->wifi_wme_noack_test;
- break;
-
case PRISM2_PARAM_ALLOW_BROADCAST_ALWAYS:
*param = local->allow_broadcast_always;
break;
- case PRISM2_PARAM_SCAN_FLAGS:
- *param = local->scan_flags;
- break;
-
case PRISM2_PARAM_HW_MODES:
*param = local->enabled_modes;
break;
--- wireless-dev.orig/net/mac80211/wme.c 2007-08-15 14:04:46.996516958 +0200
+++ wireless-dev/net/mac80211/wme.c 2007-08-15 14:07:46.476516958 +0200
@@ -192,9 +192,6 @@ static int wme_qdiscop_enqueue(struct sk
if (WLAN_FC_IS_QOS_DATA(fc)) {
u8 *p = skb->data + ieee80211_get_hdrlen(fc) - 2;
u8 qos_hdr = skb->priority & QOS_CONTROL_TAG1D_MASK;
- if (local->wifi_wme_noack_test)
- qos_hdr |= QOS_CONTROL_ACK_POLICY_NOACK <<
- QOS_CONTROL_ACK_POLICY_SHIFT;
/* qos header is 2 bytes, second reserved */
*p = qos_hdr;
p++;
--- wireless-dev.orig/include/net/mac80211.h 2007-08-15 14:07:04.636516958 +0200
+++ wireless-dev/include/net/mac80211.h 2007-08-15 14:07:46.476516958 +0200
@@ -300,9 +300,6 @@ struct ieee80211_conf {
u8 antenna_sel_tx;
u8 antenna_sel_rx;
- int antenna_def;
- int antenna_mode;
-
/* Following five fields are used for IEEE 802.11H */
unsigned int radar_detect;
unsigned int spect_mgmt;
--- wireless-dev.orig/net/mac80211/ieee80211.c 2007-08-15 14:07:04.636516958 +0200
+++ wireless-dev/net/mac80211/ieee80211.c 2007-08-15 14:07:46.486516958 +0200
@@ -779,42 +779,6 @@ struct dev_mc_list *ieee80211_get_mc_lis
}
EXPORT_SYMBOL(ieee80211_get_mc_list_item);
-static void ieee80211_stat_refresh(unsigned long data)
-{
- struct ieee80211_local *local = (struct ieee80211_local *) data;
- struct sta_info *sta;
- struct ieee80211_sub_if_data *sdata;
-
- if (!local->stat_time)
- return;
-
- /* go through all stations */
- read_lock_bh(&local->sta_lock);
- list_for_each_entry(sta, &local->sta_list, list) {
- sta->channel_use = (sta->channel_use_raw / local->stat_time) /
- CHAN_UTIL_PER_10MS;
- sta->channel_use_raw = 0;
- }
- read_unlock_bh(&local->sta_lock);
-
- /* go through all subinterfaces */
- read_lock(&local->sub_if_lock);
- list_for_each_entry(sdata, &local->sub_if_list, list) {
- sdata->channel_use = (sdata->channel_use_raw /
- local->stat_time) / CHAN_UTIL_PER_10MS;
- sdata->channel_use_raw = 0;
- }
- read_unlock(&local->sub_if_lock);
-
- /* hardware interface */
- local->channel_use = (local->channel_use_raw /
- local->stat_time) / CHAN_UTIL_PER_10MS;
- local->channel_use_raw = 0;
-
- local->stat_timer.expires = jiffies + HZ * local->stat_time / 100;
- add_timer(&local->stat_timer);
-}
-
void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
struct sk_buff *skb,
struct ieee80211_tx_status *status)
@@ -1253,9 +1217,6 @@ struct ieee80211_hw *ieee80211_alloc_hw(
INIT_LIST_HEAD(&local->sub_if_list);
INIT_DELAYED_WORK(&local->scan_work, ieee80211_sta_scan_work);
- init_timer(&local->stat_timer);
- local->stat_timer.function = ieee80211_stat_refresh;
- local->stat_timer.data = (unsigned long) local;
ieee80211_rx_bss_list_init(mdev);
sta_info_init(local);
@@ -1455,9 +1416,6 @@ void ieee80211_unregister_hw(struct ieee
rtnl_unlock();
- if (local->stat_time)
- del_timer_sync(&local->stat_timer);
-
ieee80211_rx_bss_list_deinit(local->mdev);
ieee80211_clear_tx_pending(local);
sta_info_stop(local);
--- wireless-dev.orig/net/mac80211/ieee80211_sta.c 2007-08-15 14:04:46.906516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_sta.c 2007-08-15 14:07:46.486516958 +0200
@@ -3819,15 +3819,6 @@ ieee80211_sta_scan_result(struct net_dev
if (!(local->enabled_modes & (1 << bss->hw_mode)))
return current_ev;
- if (local->scan_flags & IEEE80211_SCAN_WPA_ONLY &&
- !bss->wpa_ie && !bss->rsn_ie)
- return current_ev;
-
- if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID &&
- (local->scan_ssid_len != bss->ssid_len ||
- memcmp(local->scan_ssid, bss->ssid, bss->ssid_len) != 0))
- return current_ev;
-
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = SIOCGIWAP;
iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
@@ -3931,34 +3922,6 @@ ieee80211_sta_scan_result(struct net_dev
}
}
- do {
- char *buf;
-
- if (!(local->scan_flags & IEEE80211_SCAN_EXTRA_INFO))
- break;
-
- buf = kmalloc(100, GFP_ATOMIC);
- if (!buf)
- break;
-
- memset(&iwe, 0, sizeof(iwe));
- iwe.cmd = IWEVCUSTOM;
- sprintf(buf, "bcn_int=%d", bss->beacon_int);
- iwe.u.data.length = strlen(buf);
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe,
- buf);
-
- memset(&iwe, 0, sizeof(iwe));
- iwe.cmd = IWEVCUSTOM;
- sprintf(buf, "capab=0x%04x", bss->capability);
- iwe.u.data.length = strlen(buf);
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe,
- buf);
-
- kfree(buf);
- break;
- } while (0);
-
return current_ev;
}
--
^ permalink raw reply [flat|nested] 43+ messages in thread* Re: [PATCH 05/20] mac80211: remove unused ioctls (1)
2007-08-15 14:49 ` [PATCH 05/20] mac80211: remove unused ioctls (1) Johannes Berg
@ 2007-08-18 4:04 ` Jouni Malinen
2007-08-20 9:10 ` Johannes Berg
0 siblings, 1 reply; 43+ messages in thread
From: Jouni Malinen @ 2007-08-18 4:04 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
On Wed, Aug 15, 2007 at 04:49:25PM +0200, Johannes Berg wrote:
> The ioctls
>
> * PRISM2_PARAM_WIFI_WME_NOACK_TEST
> * PRISM2_PARAM_HOST_ENCRYPT
> * PRISM2_PARAM_HOST_DECRYPT
> * PRISM2_PARAM_ANTENNA_MODE
> * PRISM2_PARAM_STAT_TIME
> * PRISM2_PARAM_SCAN_FLAGS
>
> are not used by hostapd or wpa_supplicant.
No, but some of them can be assumed to be used with iwpriv.. First one
is useful should one be interested in WFA certifications tests. Scan
flags can be useful in filtering out scan results in cases where there
are huge numbers of APs around. I could agree with the other ones being
more or less useless here.
> --- wireless-dev.orig/net/mac80211/ieee80211_sta.c 2007-08-15 14:04:46.906516958 +0200
> +++ wireless-dev/net/mac80211/ieee80211_sta.c 2007-08-15 14:07:46.486516958 +0200
> @@ -3931,34 +3922,6 @@ ieee80211_sta_scan_result(struct net_dev
> - if (!(local->scan_flags & IEEE80211_SCAN_EXTRA_INFO))
> - break;
> - memset(&iwe, 0, sizeof(iwe));
> - iwe.cmd = IWEVCUSTOM;
> - sprintf(buf, "bcn_int=%d", bss->beacon_int);
> - iwe.u.data.length = strlen(buf);
> - current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe,
> - buf);
> -
> - memset(&iwe, 0, sizeof(iwe));
> - iwe.cmd = IWEVCUSTOM;
> - sprintf(buf, "capab=0x%04x", bss->capability);
> - iwe.u.data.length = strlen(buf);
> - current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe,
> - buf);
Even if you end up removing scan_flags, you could leave these pieces of
information available in scan results.
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PATCH 05/20] mac80211: remove unused ioctls (1)
2007-08-18 4:04 ` Jouni Malinen
@ 2007-08-20 9:10 ` Johannes Berg
2007-08-21 3:09 ` Jouni Malinen
0 siblings, 1 reply; 43+ messages in thread
From: Johannes Berg @ 2007-08-20 9:10 UTC (permalink / raw)
To: Jouni Malinen; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 960 bytes --]
On Fri, 2007-08-17 at 21:04 -0700, Jouni Malinen wrote:
> No, but some of them can be assumed to be used with iwpriv..
As for that, see my other mail.
> First one
> is useful should one be interested in WFA certifications tests.
That should, imho, rather live in debugfs. Somebody doing certification
tests ought to be able to enable debugfs on their system.
> Scan
> flags can be useful in filtering out scan results in cases where there
> are huge numbers of APs around.
Plan has it that the new cfg80211 API for scanning allows scanning for
things rather than filtering the results after the fact, e.g. (like
iwlist already supports) scanning for a particular SSID. I suppose
hardware designs like iwlwifi could make much better use of that than
mac80211 itself though.
> Even if you end up removing scan_flags, you could leave these pieces of
> information available in scan results.
Sure, I can do that.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PATCH 05/20] mac80211: remove unused ioctls (1)
2007-08-20 9:10 ` Johannes Berg
@ 2007-08-21 3:09 ` Jouni Malinen
2007-08-21 10:14 ` Johannes Berg
0 siblings, 1 reply; 43+ messages in thread
From: Jouni Malinen @ 2007-08-21 3:09 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
On Mon, Aug 20, 2007 at 11:10:05AM +0200, Johannes Berg wrote:
> On Fri, 2007-08-17 at 21:04 -0700, Jouni Malinen wrote:
> > First one
> > is useful should one be interested in WFA certifications tests.
>
> That should, imho, rather live in debugfs. Somebody doing certification
> tests ought to be able to enable debugfs on their system.
Sure, that's fine. I was mainly objecting for the part of completely
removing the code (i.e., not just the ioctl). I don't really care how
this command goes through, but anyway, I would agree that debugfs would
be more reasonable location now that it is available and already being
used elsewhere in mac80211.
> > Scan
> > flags can be useful in filtering out scan results in cases where there
> > are huge numbers of APs around.
>
> Plan has it that the new cfg80211 API for scanning allows scanning for
> things rather than filtering the results after the fact, e.g. (like
> iwlist already supports) scanning for a particular SSID. I suppose
> hardware designs like iwlwifi could make much better use of that than
> mac80211 itself though.
OK. I was more commenting on part of removing functionality, not on the
removal of ioctl itself.
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PATCH 05/20] mac80211: remove unused ioctls (1)
2007-08-21 3:09 ` Jouni Malinen
@ 2007-08-21 10:14 ` Johannes Berg
0 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-21 10:14 UTC (permalink / raw)
To: Jouni Malinen; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 539 bytes --]
On Mon, 2007-08-20 at 20:09 -0700, Jouni Malinen wrote:
> Sure, that's fine. I was mainly objecting for the part of completely
> removing the code (i.e., not just the ioctl). I don't really care how
> this command goes through, but anyway, I would agree that debugfs would
> be more reasonable location now that it is available and already being
> used elsewhere in mac80211.
Ok. I'll update the patch to move that flag instead. Though that has me
thinking, should it be a per-netdev flag rather than a global one?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PATCH 06/20] mac80211: remove PRISM2_PARAM_RADIO_ENABLED
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (4 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 05/20] mac80211: remove unused ioctls (1) Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-15 14:49 ` [PATCH 07/20] mac80211: remove unused ioctls (2) Johannes Berg
` (13 subsequent siblings)
19 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
This now is unused in hostapd/wpa_supplicant.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/hostapd_ioctl.h | 1 -
net/mac80211/ieee80211_ioctl.c | 14 --------------
2 files changed, 15 deletions(-)
--- wireless-dev.orig/net/mac80211/hostapd_ioctl.h 2007-08-15 13:39:48.466520121 +0200
+++ wireless-dev/net/mac80211/hostapd_ioctl.h 2007-08-15 13:39:49.146520121 +0200
@@ -35,7 +35,6 @@ enum {
PRISM2_PARAM_PREAMBLE = 1003,
PRISM2_PARAM_SHORT_SLOT_TIME = 1006,
PRISM2_PARAM_NEXT_MODE = 1008,
- PRISM2_PARAM_RADIO_ENABLED = 1010,
PRISM2_PARAM_PRIVACY_INVOKED = 1014,
PRISM2_PARAM_BROADCAST_SSID = 1015,
PRISM2_PARAM_STA_ANTENNA_SEL = 1017,
--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c 2007-08-15 13:39:48.466520121 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c 2007-08-15 13:39:49.146520121 +0200
@@ -1157,16 +1157,6 @@ static int ieee80211_ioctl_set_regulator
}
-static int ieee80211_ioctl_set_radio_enabled(struct net_device *dev,
- int val)
-{
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
- struct ieee80211_conf *conf = &local->hw.conf;
-
- conf->radio_enabled = val;
- return ieee80211_hw_config(wdev_priv(dev->ieee80211_ptr));
-}
-
static int
ieee80211_ioctl_set_tx_queue_params(struct net_device *dev,
struct prism2_hostapd_param *param)
@@ -2202,10 +2192,6 @@ static int ieee80211_ioctl_prism2_param(
local->next_mode = value;
break;
- case PRISM2_PARAM_RADIO_ENABLED:
- ret = ieee80211_ioctl_set_radio_enabled(dev, value);
- break;
-
case PRISM2_PARAM_BROADCAST_SSID:
if ((value < 0) || (value > 1))
ret = -EINVAL;
--
^ permalink raw reply [flat|nested] 43+ messages in thread* [PATCH 07/20] mac80211: remove unused ioctls (2)
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (5 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 06/20] mac80211: remove PRISM2_PARAM_RADIO_ENABLED Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-18 4:07 ` Jouni Malinen
2007-08-15 14:49 ` [PATCH 08/20] mac80211: remove unused ioctls (3) Johannes Berg
` (12 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
The ioctls
* PRISM2_PARAM_STA_ANTENNA_SEL
* PRISM2_PARAM_TX_POWER_REDUCTION
* PRISM2_PARAM_KEY_INDEX
* PRISM2_PARAM_DEFAULT_WEP_ONLY
* PRISM2_PARAM_ALLOW_BROADCAST_ALWAYS
are not used by hostapd or wpa_supplicant.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
drivers/net/wireless/iwl-4965-rs.c | 2 -
include/net/mac80211.h | 1
net/mac80211/debugfs.c | 5 ---
net/mac80211/hostapd_ioctl.h | 5 ---
net/mac80211/ieee80211_i.h | 11 ------
net/mac80211/ieee80211_ioctl.c | 59 -------------------------------------
net/mac80211/rc80211_simple.c | 8 -----
net/mac80211/sta_info.h | 4 --
net/mac80211/tx.c | 3 -
9 files changed, 98 deletions(-)
--- wireless-dev.orig/net/mac80211/hostapd_ioctl.h 2007-08-15 14:07:56.616516958 +0200
+++ wireless-dev/net/mac80211/hostapd_ioctl.h 2007-08-15 14:16:21.946516958 +0200
@@ -37,13 +37,8 @@ enum {
PRISM2_PARAM_NEXT_MODE = 1008,
PRISM2_PARAM_PRIVACY_INVOKED = 1014,
PRISM2_PARAM_BROADCAST_SSID = 1015,
- PRISM2_PARAM_STA_ANTENNA_SEL = 1017,
- PRISM2_PARAM_TX_POWER_REDUCTION = 1022,
PRISM2_PARAM_EAPOL = 1023,
PRISM2_PARAM_KEY_TX_RX_THRESHOLD = 1024,
- PRISM2_PARAM_KEY_INDEX = 1025,
- PRISM2_PARAM_DEFAULT_WEP_ONLY = 1026,
- PRISM2_PARAM_ALLOW_BROADCAST_ALWAYS = 1034,
PRISM2_PARAM_HW_MODES = 1036,
PRISM2_PARAM_CREATE_IBSS = 1037,
PRISM2_PARAM_WMM_ENABLED = 1038,
--- wireless-dev.orig/net/mac80211/ieee80211_i.h 2007-08-15 14:07:46.456516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_i.h 2007-08-15 14:16:22.076516958 +0200
@@ -591,12 +591,6 @@ struct ieee80211_local {
struct work_struct sta_debugfs_add;
#endif
- enum {
- STA_ANTENNA_SEL_AUTO = 0,
- STA_ANTENNA_SEL_SW_CTRL = 1,
- STA_ANTENNA_SEL_SW_CTRL_DEBUG = 2
- } sta_antenna_sel;
-
#ifdef CONFIG_MAC80211_DEBUG_COUNTERS
/* TX/RX handler statistics */
unsigned int tx_handlers_drop;
@@ -632,10 +626,6 @@ struct ieee80211_local {
int total_ps_buffered; /* total number of all buffered unicast and
* multicast packets for power saving stations
*/
- int allow_broadcast_always; /* whether to allow TX of broadcast frames
- * even when there are no associated STAs
- */
-
unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */
unsigned int enabled_modes; /* bitfield of allowed modes;
@@ -662,7 +652,6 @@ struct ieee80211_local {
struct dentry *mode;
struct dentry *wep_iv;
struct dentry *rate_ctrl_alg;
- struct dentry *tx_power_reduction;
struct dentry *modes;
struct dentry *statistics;
struct local_debugfsdentries_statsdentries {
--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:07:56.626516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:16:22.106516958 +0200
@@ -2201,17 +2201,6 @@ static int ieee80211_ioctl_prism2_param(
local->hw.conf.flags &= ~IEEE80211_CONF_SSID_HIDDEN;
break;
- case PRISM2_PARAM_STA_ANTENNA_SEL:
- local->sta_antenna_sel = value;
- break;
-
- case PRISM2_PARAM_TX_POWER_REDUCTION:
- if (value < 0)
- ret = -EINVAL;
- else
- local->hw.conf.tx_power_reduction = value;
- break;
-
case PRISM2_PARAM_EAPOL:
sdata->eapol = value;
break;
@@ -2220,23 +2209,6 @@ static int ieee80211_ioctl_prism2_param(
local->key_tx_rx_threshold = value;
break;
- case PRISM2_PARAM_KEY_INDEX:
- if (value < 0 || value >= NUM_DEFAULT_KEYS)
- ret = -EINVAL;
- else if (!sdata->keys[value])
- ret = -ENOENT;
- else
- sdata->default_key = sdata->keys[value];
- break;
-
- case PRISM2_PARAM_DEFAULT_WEP_ONLY:
- ret = ieee80211_ioctl_default_wep_only(local, value);
- break;
-
- case PRISM2_PARAM_ALLOW_BROADCAST_ALWAYS:
- local->allow_broadcast_always = value;
- break;
-
case PRISM2_PARAM_MIXED_CELL:
if (sdata->type != IEEE80211_IF_TYPE_STA &&
sdata->type != IEEE80211_IF_TYPE_IBSS)
@@ -2348,14 +2320,6 @@ static int ieee80211_ioctl_get_prism2_pa
*param = !!(local->hw.conf.flags & IEEE80211_CONF_SSID_HIDDEN);
break;
- case PRISM2_PARAM_STA_ANTENNA_SEL:
- *param = local->sta_antenna_sel;
- break;
-
- case PRISM2_PARAM_TX_POWER_REDUCTION:
- *param = local->hw.conf.tx_power_reduction;
- break;
-
case PRISM2_PARAM_EAPOL:
*param = sdata->eapol;
break;
@@ -2364,29 +2328,6 @@ static int ieee80211_ioctl_get_prism2_pa
*param = local->key_tx_rx_threshold;
break;
- case PRISM2_PARAM_KEY_INDEX:
- if (!sdata->default_key)
- ret = -ENOENT;
- else if (sdata->default_key == sdata->keys[0])
- *param = 0;
- else if (sdata->default_key == sdata->keys[1])
- *param = 1;
- else if (sdata->default_key == sdata->keys[2])
- *param = 2;
- else if (sdata->default_key == sdata->keys[3])
- *param = 3;
- else
- ret = -ENOENT;
- break;
-
- case PRISM2_PARAM_DEFAULT_WEP_ONLY:
- *param = local->default_wep_only;
- break;
-
- case PRISM2_PARAM_ALLOW_BROADCAST_ALWAYS:
- *param = local->allow_broadcast_always;
- break;
-
case PRISM2_PARAM_HW_MODES:
*param = local->enabled_modes;
break;
--- wireless-dev.orig/net/mac80211/rc80211_simple.c 2007-08-15 14:04:45.496516958 +0200
+++ wireless-dev/net/mac80211/rc80211_simple.c 2007-08-15 14:08:02.996516958 +0200
@@ -147,14 +147,6 @@ static void rate_control_simple_tx_statu
srctrl = sta->rate_ctrl_priv;
srctrl->tx_num_xmit++;
if (status->excessive_retries) {
- sta->antenna_sel_tx = sta->antenna_sel_tx == 1 ? 2 : 1;
- sta->antenna_sel_rx = sta->antenna_sel_rx == 1 ? 2 : 1;
- if (local->sta_antenna_sel == STA_ANTENNA_SEL_SW_CTRL_DEBUG) {
- printk(KERN_DEBUG "%s: " MAC_FMT " TX antenna --> %d "
- "RX antenna --> %d (@%lu)\n",
- dev->name, MAC_ARG(hdr->addr1),
- sta->antenna_sel_tx, sta->antenna_sel_rx, jiffies);
- }
srctrl->tx_num_failures++;
sta->tx_retry_failed++;
sta->tx_num_consecutive_failures++;
--- wireless-dev.orig/net/mac80211/tx.c 2007-08-15 14:04:47.806516958 +0200
+++ wireless-dev/net/mac80211/tx.c 2007-08-15 14:08:02.996516958 +0200
@@ -243,7 +243,6 @@ ieee80211_tx_h_check_assoc(struct ieee80
} else {
if (unlikely((tx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA &&
tx->local->num_sta == 0 &&
- !tx->local->allow_broadcast_always &&
tx->sdata->type != IEEE80211_IF_TYPE_IBSS)) {
/*
* No associated STAs - no need to send multicast
@@ -959,8 +958,6 @@ __ieee80211_tx_prepare(struct ieee80211_
*/
control->power_level = local->hw.conf.power_level;
control->antenna_sel_tx = local->hw.conf.antenna_sel_tx;
- if (local->sta_antenna_sel != STA_ANTENNA_SEL_AUTO && tx->sta)
- control->antenna_sel_tx = tx->sta->antenna_sel_tx;
/* process and remove the injection radiotap header */
sdata = IEEE80211_DEV_TO_SUB_IF(dev);
--- wireless-dev.orig/net/mac80211/sta_info.h 2007-08-15 14:04:45.536516958 +0200
+++ wireless-dev/net/mac80211/sta_info.h 2007-08-15 14:08:02.996516958 +0200
@@ -91,10 +91,6 @@ struct sta_info {
int channel_use;
int channel_use_raw;
- u8 antenna_sel_tx;
- u8 antenna_sel_rx;
-
-
int key_idx_compression; /* key table index for compression and TX
* filtering; used only if sta->key is not
* set */
--- wireless-dev.orig/include/net/mac80211.h 2007-08-15 14:07:46.476516958 +0200
+++ wireless-dev/include/net/mac80211.h 2007-08-15 14:16:19.606516958 +0200
@@ -294,7 +294,6 @@ struct ieee80211_conf {
u8 power_level; /* transmit power limit for current
* regulatory domain; in dBm */
u8 antenna_max; /* maximum antenna gain */
- short tx_power_reduction; /* in 0.1 dBm */
/* 0 = default/diversity, 1 = Ant0, 2 = Ant1 */
u8 antenna_sel_tx;
--- wireless-dev.orig/net/mac80211/debugfs.c 2007-08-15 14:04:45.596516958 +0200
+++ wireless-dev/net/mac80211/debugfs.c 2007-08-15 14:16:19.396516958 +0200
@@ -124,9 +124,6 @@ DEBUGFS_READONLY_FILE(mode, 20, "%s",
ieee80211_mode_str(local->hw.conf.phymode));
DEBUGFS_READONLY_FILE(wep_iv, 20, "%#06x",
local->wep_iv & 0xffffff);
-DEBUGFS_READONLY_FILE(tx_power_reduction, 20, "%d.%d dBm",
- local->hw.conf.tx_power_reduction / 10,
- local->hw.conf.tx_power_reduction % 10);
DEBUGFS_READ(rate_ctrl_alg, 100, "%s",
local->rate_ctrl ? local->rate_ctrl->ops->name : "<unset>");
@@ -347,7 +344,6 @@ void debugfs_hw_add(struct ieee80211_loc
DEBUGFS_ADD(total_ps_buffered);
DEBUGFS_ADD(mode);
DEBUGFS_ADD(wep_iv);
- DEBUGFS_ADD(tx_power_reduction);
DEBUGFS_ADD_MODE(rate_ctrl_alg, 0644);
DEBUGFS_ADD(modes);
@@ -413,7 +409,6 @@ void debugfs_hw_del(struct ieee80211_loc
DEBUGFS_DEL(total_ps_buffered);
DEBUGFS_DEL(mode);
DEBUGFS_DEL(wep_iv);
- DEBUGFS_DEL(tx_power_reduction);
DEBUGFS_DEL(rate_ctrl_alg);
DEBUGFS_DEL(modes);
--- wireless-dev.orig/drivers/net/wireless/iwl-4965-rs.c 2007-08-15 14:16:19.686516958 +0200
+++ wireless-dev/drivers/net/wireless/iwl-4965-rs.c 2007-08-15 14:16:28.706516958 +0200
@@ -1661,8 +1661,6 @@ out:
(lq_data->phymode == (u8) MODE_ATHEROS_TURBO))
sta->txrate = i - IWL_FIRST_OFDM_RATE;
- sta->antenna_sel_tx = tbl->lq_type;
-
return;
}
--
^ permalink raw reply [flat|nested] 43+ messages in thread* Re: [PATCH 07/20] mac80211: remove unused ioctls (2)
2007-08-15 14:49 ` [PATCH 07/20] mac80211: remove unused ioctls (2) Johannes Berg
@ 2007-08-18 4:07 ` Jouni Malinen
2007-08-20 9:13 ` Johannes Berg
0 siblings, 1 reply; 43+ messages in thread
From: Jouni Malinen @ 2007-08-18 4:07 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
On Wed, Aug 15, 2007 at 04:49:27PM +0200, Johannes Berg wrote:
> The ioctls
>
> * PRISM2_PARAM_STA_ANTENNA_SEL
> * PRISM2_PARAM_TX_POWER_REDUCTION
> * PRISM2_PARAM_KEY_INDEX
> * PRISM2_PARAM_DEFAULT_WEP_ONLY
> * PRISM2_PARAM_ALLOW_BROADCAST_ALWAYS
>
> are not used by hostapd or wpa_supplicant.
Well, maybe so. But again, some are useful for testing (e.g., allow
broadcast always for continuous TX tests). Default WEP only is useful
for optimizing hwaccel in some multi-SSID cases, but it seemed to have
already been broken before..
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PATCH 07/20] mac80211: remove unused ioctls (2)
2007-08-18 4:07 ` Jouni Malinen
@ 2007-08-20 9:13 ` Johannes Berg
2007-08-21 3:19 ` Jouni Malinen
0 siblings, 1 reply; 43+ messages in thread
From: Johannes Berg @ 2007-08-20 9:13 UTC (permalink / raw)
To: Jouni Malinen; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 814 bytes --]
On Fri, 2007-08-17 at 21:07 -0700, Jouni Malinen wrote:
> Well, maybe so. But again, some are useful for testing (e.g., allow
> broadcast always for continuous TX tests).
Again, a case for debugfs. I've already moved the WPA testing hooks
there previous to this patch series.
> Default WEP only is useful
> for optimizing hwaccel in some multi-SSID cases, but it seemed to have
> already been broken before..
Could have been me, could have been elsewhere, I don't know. However,
it's also undocumented and there's no driver that actually cares. If we
find hardware that requires it I'm all for optimising it, but until then
I don't much see the point. Yes, it'll require some more effort for the
author of that driver, but at least then we'll be sure that it works as
advertised.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PATCH 07/20] mac80211: remove unused ioctls (2)
2007-08-20 9:13 ` Johannes Berg
@ 2007-08-21 3:19 ` Jouni Malinen
2007-08-21 10:12 ` Johannes Berg
0 siblings, 1 reply; 43+ messages in thread
From: Jouni Malinen @ 2007-08-21 3:19 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
On Mon, Aug 20, 2007 at 11:13:28AM +0200, Johannes Berg wrote:
> On Fri, 2007-08-17 at 21:07 -0700, Jouni Malinen wrote:
>
> > Well, maybe so. But again, some are useful for testing (e.g., allow
> > broadcast always for continuous TX tests).
>
> Again, a case for debugfs. I've already moved the WPA testing hooks
> there previous to this patch series.
Agreed as far as debugfs is concerned. However, I thought a bit more
about the test case where this used to be helpful and I think that the
test can be implemented differently, so I'm fine with the
send-group-when-no-associated-STAs option just go away.
> > Default WEP only is useful
> > for optimizing hwaccel in some multi-SSID cases, but it seemed to have
> > already been broken before..
>
> Could have been me, could have been elsewhere, I don't know. However,
> it's also undocumented and there's no driver that actually cares. If we
> find hardware that requires it I'm all for optimising it, but until then
> I don't much see the point. Yes, it'll require some more effort for the
> author of that driver, but at least then we'll be sure that it works as
> advertised.
This is a very good example of something that should have been
documented since it would take me some thinking to remember what exactly
was the issue ;-). I just know that there was one with a common wlan
hardware design and the optimization was quite useful for some of the
configurations we were hitting. Without knowing how the WEP keys are
used, some of the optimizations were impossible to do in hwaccel and we
had to do most of decryption in software (not a very nice thing on an AP
with just barely fast enough CPU to handle open network at full transmit
rate)..
Then again, I think I'm actually fine with removing this now and see if
anyone complains.. If nothing else, that saves me having to figure out
now what the configuration was that forced me to add this extra
information.
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PATCH 07/20] mac80211: remove unused ioctls (2)
2007-08-21 3:19 ` Jouni Malinen
@ 2007-08-21 10:12 ` Johannes Berg
0 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-21 10:12 UTC (permalink / raw)
To: Jouni Malinen; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1658 bytes --]
On Mon, 2007-08-20 at 20:19 -0700, Jouni Malinen wrote:
> Agreed as far as debugfs is concerned. However, I thought a bit more
> about the test case where this used to be helpful and I think that the
> test can be implemented differently, so I'm fine with the
> send-group-when-no-associated-STAs option just go away.
Mind explaining the test case? I'm just curious :)
> > > Default WEP
> This is a very good example of something that should have been
> documented since it would take me some thinking to remember what exactly
> was the issue ;-).
Heh.
> I just know that there was one with a common wlan
> hardware design and the optimization was quite useful for some of the
> configurations we were hitting. Without knowing how the WEP keys are
> used, some of the optimizations were impossible to do in hwaccel and we
> had to do most of decryption in software (not a very nice thing on an AP
> with just barely fast enough CPU to handle open network at full transmit
> rate)..
That all makes sense. I've been reworking the set_key() callback though
so that the driver will be able to make most decisions without extra
information, for example I've removed the TKIP+WME=broken flag in favour
of telling the driver with each key whether it may be used with WME.
> Then again, I think I'm actually fine with removing this now and see if
> anyone complains.. If nothing else, that saves me having to figure out
> now what the configuration was that forced me to add this extra
> information.
:)
Now I only need to go through this patch and see what we agreed on and
what not. I'll do that later.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PATCH 08/20] mac80211: remove unused ioctls (3)
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (6 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 07/20] mac80211: remove unused ioctls (2) Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-18 4:09 ` Jouni Malinen
2007-08-15 14:49 ` [PATCH 09/20] mac80211: remove unused ioctls (4) Johannes Berg
` (11 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
The ioctls
* PRISM2_PARAM_HW_MODES
* PRISM2_PARAM_CREATE_IBSS
* PRISM2_PARAM_WMM_ENABLED
* PRISM2_PARAM_MIXED_CELL
* PRISM2_PARAM_KEY_MGMT
are not used by hostapd or wpa_supplicant.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/hostapd_ioctl.h | 5 --
net/mac80211/ieee80211.c | 2 -
net/mac80211/ieee80211_i.h | 4 --
net/mac80211/ieee80211_iface.c | 2 -
net/mac80211/ieee80211_ioctl.c | 71 +----------------------------------------
net/mac80211/ieee80211_sta.c | 37 +++++++++------------
6 files changed, 19 insertions(+), 102 deletions(-)
--- wireless-dev.orig/net/mac80211/hostapd_ioctl.h 2007-08-15 14:08:02.986516958 +0200
+++ wireless-dev/net/mac80211/hostapd_ioctl.h 2007-08-15 14:08:54.636516958 +0200
@@ -39,11 +39,6 @@ enum {
PRISM2_PARAM_BROADCAST_SSID = 1015,
PRISM2_PARAM_EAPOL = 1023,
PRISM2_PARAM_KEY_TX_RX_THRESHOLD = 1024,
- PRISM2_PARAM_HW_MODES = 1036,
- PRISM2_PARAM_CREATE_IBSS = 1037,
- PRISM2_PARAM_WMM_ENABLED = 1038,
- PRISM2_PARAM_MIXED_CELL = 1039,
- PRISM2_PARAM_KEY_MGMT = 1040,
PRISM2_PARAM_RADAR_DETECT = 1043,
PRISM2_PARAM_SPECTRUM_MGMT = 1044,
PRISM2_PARAM_USER_SPACE_MLME = 1045,
--- wireless-dev.orig/net/mac80211/ieee80211.c 2007-08-15 14:07:46.486516958 +0200
+++ wireless-dev/net/mac80211/ieee80211.c 2007-08-15 14:08:54.636516958 +0200
@@ -1209,8 +1209,6 @@ struct ieee80211_hw *ieee80211_alloc_hw(
local->long_retry_limit = 4;
local->hw.conf.radio_enabled = 1;
- local->enabled_modes = (unsigned int) -1;
-
INIT_LIST_HEAD(&local->modes_list);
rwlock_init(&local->sub_if_lock);
--- wireless-dev.orig/net/mac80211/ieee80211_i.h 2007-08-15 14:08:02.986516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_i.h 2007-08-15 14:08:54.646516958 +0200
@@ -266,8 +266,6 @@ struct ieee80211_if_sta {
unsigned int authenticated:1;
unsigned int associated:1;
unsigned int probereq_poll:1;
- unsigned int create_ibss:1;
- unsigned int mixed_cell:1;
unsigned int wmm_enabled:1;
unsigned int ht_enabled:1;
unsigned int auto_ssid_sel:1;
@@ -628,8 +626,6 @@ struct ieee80211_local {
*/
unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */
- unsigned int enabled_modes; /* bitfield of allowed modes;
- * (1 << MODE_*) */
unsigned int hw_modes; /* bitfield of supported hardware modes;
* (1 << MODE_*) */
--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:08:02.996516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:09:31.376516958 +0200
@@ -1456,9 +1456,8 @@ static int ieee80211_ioctl_giwrange(stru
list_for_each_entry(mode, &local->modes_list, list) {
int i = 0;
- if (!(local->enabled_modes & (1 << mode->mode)) ||
- (local->hw_modes & local->enabled_modes &
- (1 << MODE_IEEE80211G) && mode->mode == MODE_IEEE80211B))
+ if ((local->hw_modes & (1 << MODE_IEEE80211G) &&
+ mode->mode == MODE_IEEE80211B))
continue;
while (i < mode->num_channels && c < IW_MAX_FREQUENCIES) {
@@ -1567,8 +1566,6 @@ int ieee80211_set_channel(struct ieee802
int ret = -EINVAL;
list_for_each_entry(mode, &local->modes_list, list) {
- if (!(local->enabled_modes & (1 << mode->mode)))
- continue;
for (c = 0; c < mode->num_channels; c++) {
struct ieee80211_channel *chan = &mode->channels[c];
if (chan->flag & IEEE80211_CHAN_W_SCAN &&
@@ -2209,38 +2206,6 @@ static int ieee80211_ioctl_prism2_param(
local->key_tx_rx_threshold = value;
break;
- case PRISM2_PARAM_MIXED_CELL:
- if (sdata->type != IEEE80211_IF_TYPE_STA &&
- sdata->type != IEEE80211_IF_TYPE_IBSS)
- ret = -EINVAL;
- else
- sdata->u.sta.mixed_cell = !!value;
- break;
-
- case PRISM2_PARAM_KEY_MGMT:
- if (sdata->type != IEEE80211_IF_TYPE_STA)
- ret = -EINVAL;
- else
- sdata->u.sta.key_mgmt = value;
- break;
-
- case PRISM2_PARAM_HW_MODES:
- local->enabled_modes = value;
- break;
-
- case PRISM2_PARAM_CREATE_IBSS:
- if (sdata->type != IEEE80211_IF_TYPE_IBSS)
- ret = -EINVAL;
- else
- sdata->u.sta.create_ibss = !!value;
- break;
- case PRISM2_PARAM_WMM_ENABLED:
- if (sdata->type != IEEE80211_IF_TYPE_STA &&
- sdata->type != IEEE80211_IF_TYPE_IBSS)
- ret = -EINVAL;
- else
- sdata->u.sta.wmm_enabled = !!value;
- break;
case PRISM2_PARAM_RADAR_DETECT:
local->hw.conf.radar_detect = value;
break;
@@ -2328,38 +2293,6 @@ static int ieee80211_ioctl_get_prism2_pa
*param = local->key_tx_rx_threshold;
break;
- case PRISM2_PARAM_HW_MODES:
- *param = local->enabled_modes;
- break;
-
- case PRISM2_PARAM_CREATE_IBSS:
- if (sdata->type != IEEE80211_IF_TYPE_IBSS)
- ret = -EINVAL;
- else
- *param = !!sdata->u.sta.create_ibss;
- break;
-
- case PRISM2_PARAM_MIXED_CELL:
- if (sdata->type != IEEE80211_IF_TYPE_STA &&
- sdata->type != IEEE80211_IF_TYPE_IBSS)
- ret = -EINVAL;
- else
- *param = !!sdata->u.sta.mixed_cell;
- break;
-
- case PRISM2_PARAM_KEY_MGMT:
- if (sdata->type != IEEE80211_IF_TYPE_STA)
- ret = -EINVAL;
- else
- *param = sdata->u.sta.key_mgmt;
- break;
- case PRISM2_PARAM_WMM_ENABLED:
- if (sdata->type != IEEE80211_IF_TYPE_STA &&
- sdata->type != IEEE80211_IF_TYPE_IBSS)
- ret = -EINVAL;
- else
- *param = !!sdata->u.sta.wmm_enabled;
- break;
case PRISM2_PARAM_MGMT_IF:
if (local->apdev)
*param = local->apdev->ifindex;
--- wireless-dev.orig/net/mac80211/ieee80211_sta.c 2007-08-15 14:07:46.486516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_sta.c 2007-08-15 14:08:54.646516958 +0200
@@ -673,7 +673,7 @@ static void ieee80211_send_assoc(struct
memcpy(pos, ifsta->extra_ie, ifsta->extra_ie_len);
}
- if (wmm && ifsta->wmm_enabled) {
+ if (wmm) {
pos = skb_put(skb, 9);
*pos++ = WLAN_EID_VENDOR_SPECIFIC;
*pos++ = 7; /* len */
@@ -1168,8 +1168,7 @@ static int ieee80211_privacy_mismatch(st
struct ieee80211_sta_bss *bss;
int res = 0;
- if (!ifsta || ifsta->mixed_cell ||
- ifsta->key_mgmt != IEEE80211_KEY_MGMT_NONE)
+ if (!ifsta || ifsta->key_mgmt != IEEE80211_KEY_MGMT_NONE)
return 0;
bss = ieee80211_rx_bss_get(dev, ifsta->bssid);
@@ -1762,7 +1761,7 @@ static void ieee80211_rx_mgmt_assoc_resp
rate_control_rate_init(sta, local);
- if (elems.wmm_param && ifsta->wmm_enabled) {
+ if (elems.wmm_param) {
sta->flags |= WLAN_STA_WME;
ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param,
elems.wmm_param_len);
@@ -2445,7 +2444,7 @@ static void ieee80211_rx_mgmt_beacon(str
if (elems.erp_info && elems.erp_info_len >= 1)
ieee80211_handle_erp_ie(dev, elems.erp_info[0]);
- if (elems.wmm_param && ifsta->wmm_enabled) {
+ if (elems.wmm_param) {
ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param,
elems.wmm_param_len);
}
@@ -3422,15 +3421,16 @@ static int ieee80211_sta_find_ibss(struc
if (time_after(jiffies, ifsta->ibss_join_req +
IEEE80211_IBSS_JOIN_TIMEOUT)) {
- if (ifsta->create_ibss &&
- local->oper_channel->flag & IEEE80211_CHAN_W_IBSS)
+ if (local->oper_channel->flag & IEEE80211_CHAN_W_IBSS)
return ieee80211_sta_create_ibss(dev, ifsta);
- if (ifsta->create_ibss) {
- printk(KERN_DEBUG "%s: IBSS not allowed on the"
- " configured channel %d (%d MHz)\n",
- dev->name, local->hw.conf.channel,
- local->hw.conf.freq);
- }
+ /*
+ * I suspect the if (create_ibss) test here should have been
+ * inverted but this patch series is janitorial.
+ */
+ printk(KERN_DEBUG "%s: IBSS not allowed on the"
+ " configured channel %d (%d MHz)\n",
+ dev->name, local->hw.conf.channel,
+ local->hw.conf.freq);
/* No IBSS found - decrease scan interval and continue
* scanning. */
@@ -3628,8 +3628,8 @@ void ieee80211_sta_scan_work(struct work
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_hw_mode *mode;
struct ieee80211_channel *chan;
- int skip;
unsigned long next_delay = 0;
+ int skip;
if (!local->sta_scanning)
return;
@@ -3642,13 +3642,13 @@ void ieee80211_sta_scan_work(struct work
ieee80211_scan_completed(local_to_hw(local));
return;
}
- skip = !(local->enabled_modes & (1 << mode->mode));
chan = &mode->channels[local->scan_channel_idx];
+ skip = 0;
if (!(chan->flag & IEEE80211_CHAN_W_SCAN) ||
(sdata->type == IEEE80211_IF_TYPE_IBSS &&
!(chan->flag & IEEE80211_CHAN_W_IBSS)) ||
- (local->hw_modes & local->enabled_modes &
- (1 << MODE_IEEE80211G) && mode->mode == MODE_IEEE80211B))
+ (local->hw_modes & (1 << MODE_IEEE80211G) &&
+ mode->mode == MODE_IEEE80211B))
skip = 1;
if (!skip) {
@@ -3816,9 +3816,6 @@ ieee80211_sta_scan_result(struct net_dev
bss->last_update + IEEE80211_SCAN_RESULT_EXPIRE))
return current_ev;
- if (!(local->enabled_modes & (1 << bss->hw_mode)))
- return current_ev;
-
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = SIOCGIWAP;
iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
--- wireless-dev.orig/net/mac80211/ieee80211_iface.c 2007-08-15 14:05:13.556516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_iface.c 2007-08-15 14:08:54.676516958 +0200
@@ -192,8 +192,6 @@ void ieee80211_if_set_type(struct net_de
ifsta->capab = WLAN_CAPABILITY_ESS;
ifsta->auth_algs = IEEE80211_AUTH_ALG_OPEN |
IEEE80211_AUTH_ALG_SHARED_KEY;
- ifsta->create_ibss = 1;
- ifsta->wmm_enabled = 1;
ifsta->ht_enabled = 1;
ifsta->auto_channel_sel = 1;
ifsta->auto_bssid_sel = 1;
--
^ permalink raw reply [flat|nested] 43+ messages in thread* Re: [PATCH 08/20] mac80211: remove unused ioctls (3)
2007-08-15 14:49 ` [PATCH 08/20] mac80211: remove unused ioctls (3) Johannes Berg
@ 2007-08-18 4:09 ` Jouni Malinen
2007-08-20 9:15 ` Johannes Berg
0 siblings, 1 reply; 43+ messages in thread
From: Jouni Malinen @ 2007-08-18 4:09 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
On Wed, Aug 15, 2007 at 04:49:28PM +0200, Johannes Berg wrote:
> The ioctls
>
> * PRISM2_PARAM_HW_MODES
> * PRISM2_PARAM_CREATE_IBSS
> * PRISM2_PARAM_WMM_ENABLED
> * PRISM2_PARAM_MIXED_CELL
> * PRISM2_PARAM_KEY_MGMT
>
> are not used by hostapd or wpa_supplicant.
No, but iwpriv.. See the pattern here.. ;-)
Create IBSS is a somewhat commonly used configuration and so is mixed
cell configuration in Cisco-world (and the only point for the
privacy_mismatch check that is left broken after this patch).
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PATCH 08/20] mac80211: remove unused ioctls (3)
2007-08-18 4:09 ` Jouni Malinen
@ 2007-08-20 9:15 ` Johannes Berg
2007-08-21 3:13 ` Jouni Malinen
0 siblings, 1 reply; 43+ messages in thread
From: Johannes Berg @ 2007-08-20 9:15 UTC (permalink / raw)
To: Jouni Malinen; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 891 bytes --]
On Fri, 2007-08-17 at 21:09 -0700, Jouni Malinen wrote:
> Create IBSS is a somewhat commonly used configuration and so is mixed
> cell configuration in Cisco-world (and the only point for the
> privacy_mismatch check that is left broken after this patch).
I was under the impression that the auth mechanism setting would still
do that. What is "mixed cell configuration" anyway?
> No, but iwpriv.. See the pattern here.. ;-)
Oh, I can see that, but none of these things are documented nor do any
existing tools use them. I don't contend the fact that these may indeed
be useful, but I think none of them should be private ioctls. If you
have a use case for all of these I'd be happy to see an explanation so
we can add this with proper documentation elsewhere. Without
documentation, they are a rather useless special configurations nobody
will ever touch.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PATCH 08/20] mac80211: remove unused ioctls (3)
2007-08-20 9:15 ` Johannes Berg
@ 2007-08-21 3:13 ` Jouni Malinen
0 siblings, 0 replies; 43+ messages in thread
From: Jouni Malinen @ 2007-08-21 3:13 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
On Mon, Aug 20, 2007 at 11:15:41AM +0200, Johannes Berg wrote:
> On Fri, 2007-08-17 at 21:09 -0700, Jouni Malinen wrote:
>
> > Create IBSS is a somewhat commonly used configuration and so is mixed
> > cell configuration in Cisco-world (and the only point for the
> > privacy_mismatch check that is left broken after this patch).
>
> I was under the impression that the auth mechanism setting would still
> do that. What is "mixed cell configuration" anyway?
As far as I know, it is an option that allows the client to associate
with a network that has a mismatch in the privacy setting (with its own
configuration). This would only happen in case the same SSID/beacon
frame were to be used to advertise multiple networks with conflicting
security policies (open and encryption), i.e., a "mixed cell".
> > No, but iwpriv.. See the pattern here.. ;-)
>
> Oh, I can see that, but none of these things are documented nor do any
> existing tools use them. I don't contend the fact that these may indeed
> be useful, but I think none of them should be private ioctls. If you
> have a use case for all of these I'd be happy to see an explanation so
> we can add this with proper documentation elsewhere. Without
> documentation, they are a rather useless special configurations nobody
> will ever touch.
iwpriv is an existing tool that uses these. I'm perfectly fine with
doing this any other way, so no problems there, and I can also accept
that there is unfortunate lack of documentation for many of the
parameters.
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PATCH 09/20] mac80211: remove unused ioctls (4)
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (7 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 08/20] mac80211: remove unused ioctls (3) Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-15 14:49 ` [PATCH 10/20] mac80211: remove unused ioctls (5) Johannes Berg
` (10 subsequent siblings)
19 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
The ioctls
* PRISM2_PARAM_RADAR_DETECT
* PRISM2_PARAM_SPECTRUM_MGMT
* PRISM2_HOSTAPD_MLME
* PRISM2_HOSTAPD_SET_RADAR_PARAMS
* PRISM2_HOSTAPD_SET_QUIET_PARAMS
are not used by hostapd or wpa_supplicant,
* PRISM2_HOSTAPD_WPA_TRIGGER
was not in use any more since the wpa trigger moved into
debugfs.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
include/net/mac80211.h | 13 --------
net/mac80211/debugfs.c | 4 --
net/mac80211/hostapd_ioctl.h | 24 --------------
net/mac80211/ieee80211_i.h | 1
net/mac80211/ieee80211_ioctl.c | 66 -----------------------------------------
5 files changed, 108 deletions(-)
--- wireless-dev.orig/net/mac80211/debugfs.c 2007-08-15 14:08:02.996516958 +0200
+++ wireless-dev/net/mac80211/debugfs.c 2007-08-15 14:09:54.916516958 +0200
@@ -100,8 +100,6 @@ DEBUGFS_READONLY_FILE(channel, 20, "%d",
local->hw.conf.channel);
DEBUGFS_READONLY_FILE(frequency, 20, "%d",
local->hw.conf.freq);
-DEBUGFS_READONLY_FILE(radar_detect, 20, "%d",
- local->hw.conf.radar_detect);
DEBUGFS_READONLY_FILE(antenna_sel_tx, 20, "%d",
local->hw.conf.antenna_sel_tx);
DEBUGFS_READONLY_FILE(antenna_sel_rx, 20, "%d",
@@ -332,7 +330,6 @@ void debugfs_hw_add(struct ieee80211_loc
DEBUGFS_ADD(channel);
DEBUGFS_ADD(frequency);
- DEBUGFS_ADD(radar_detect);
DEBUGFS_ADD(antenna_sel_tx);
DEBUGFS_ADD(antenna_sel_rx);
DEBUGFS_ADD(bridge_packets);
@@ -397,7 +394,6 @@ void debugfs_hw_del(struct ieee80211_loc
{
DEBUGFS_DEL(channel);
DEBUGFS_DEL(frequency);
- DEBUGFS_DEL(radar_detect);
DEBUGFS_DEL(antenna_sel_tx);
DEBUGFS_DEL(antenna_sel_rx);
DEBUGFS_DEL(bridge_packets);
--- wireless-dev.orig/net/mac80211/hostapd_ioctl.h 2007-08-15 14:08:54.636516958 +0200
+++ wireless-dev/net/mac80211/hostapd_ioctl.h 2007-08-15 14:16:10.676516958 +0200
@@ -39,8 +39,6 @@ enum {
PRISM2_PARAM_BROADCAST_SSID = 1015,
PRISM2_PARAM_EAPOL = 1023,
PRISM2_PARAM_KEY_TX_RX_THRESHOLD = 1024,
- PRISM2_PARAM_RADAR_DETECT = 1043,
- PRISM2_PARAM_SPECTRUM_MGMT = 1044,
PRISM2_PARAM_USER_SPACE_MLME = 1045,
PRISM2_PARAM_MGMT_IF = 1046,
};
@@ -56,12 +54,10 @@ enum {
PRISM2_SET_ENCRYPTION = 6,
PRISM2_GET_ENCRYPTION = 7,
PRISM2_HOSTAPD_SET_FLAGS_STA = 8,
- PRISM2_HOSTAPD_MLME = 13,
/* Instant802 additions */
PRISM2_HOSTAPD_SET_BEACON = 1001,
PRISM2_HOSTAPD_GET_HW_FEATURES = 1002,
- PRISM2_HOSTAPD_WPA_TRIGGER = 1004,
PRISM2_HOSTAPD_SET_RATE_SETS = 1005,
PRISM2_HOSTAPD_ADD_IF = 1006,
PRISM2_HOSTAPD_REMOVE_IF = 1007,
@@ -76,8 +72,6 @@ enum {
PRISM2_HOSTAPD_SCAN_REQ = 1019,
PRISM2_STA_GET_STATE = 1020,
PRISM2_HOSTAPD_FLUSH_IFS = 1021,
- PRISM2_HOSTAPD_SET_RADAR_PARAMS = 1023,
- PRISM2_HOSTAPD_SET_QUIET_PARAMS = 1024,
};
#define PRISM2_HOSTAPD_MAX_BUF_SIZE 2048
@@ -220,24 +214,6 @@ struct prism2_hostapd_param {
u32 state;
} sta_get_state;
struct {
-#define MLME_STA_DEAUTH 0
-#define MLME_STA_DISASSOC 1
- u16 cmd;
- u16 reason_code;
- } mlme;
- struct {
- u8 radar_firpwr_threshold;
- u8 radar_rssi_threshold;
- u8 pulse_height_threshold;
- u8 pulse_rssi_threshold;
- u8 pulse_inband_threshold;
- } radar;
- struct {
- unsigned int period;
- unsigned int offset;
- unsigned int duration;
- } quiet;
- struct {
u8 dummy[80]; /* Make sizeof() this struct large enough
* with some compiler versions. */
} dummy;
--- wireless-dev.orig/net/mac80211/ieee80211_i.h 2007-08-15 14:08:54.646516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_i.h 2007-08-15 14:14:43.776516958 +0200
@@ -635,7 +635,6 @@ struct ieee80211_local {
struct local_debugfsdentries {
struct dentry *channel;
struct dentry *frequency;
- struct dentry *radar_detect;
struct dentry *antenna_sel_tx;
struct dentry *antenna_sel_rx;
struct dentry *bridge_packets;
--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:09:31.376516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:16:10.736516958 +0200
@@ -1031,29 +1031,6 @@ static int ieee80211_ioctl_sta_get_state
}
-static int ieee80211_ioctl_mlme(struct net_device *dev,
- struct prism2_hostapd_param *param)
-{
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
- struct ieee80211_sub_if_data *sdata;
-
- if (local->user_space_mlme)
- return -EOPNOTSUPP;
-
- sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- if (sdata->type != IEEE80211_IF_TYPE_STA &&
- sdata->type != IEEE80211_IF_TYPE_IBSS)
- return -EINVAL;
- switch (param->u.mlme.cmd) {
- case MLME_STA_DEAUTH:
- return ieee80211_sta_deauthenticate(dev, param->u.mlme.reason_code);
- case MLME_STA_DISASSOC:
- return ieee80211_sta_disassociate(dev, param->u.mlme.reason_code);
- }
- return 0;
-}
-
-
static int ieee80211_ioctl_get_load_stats(struct net_device *dev,
struct prism2_hostapd_param *param)
{
@@ -1240,34 +1217,6 @@ found:
}
-static int ieee80211_ioctl_set_quiet_params(struct net_device *dev,
- struct prism2_hostapd_param *param)
-{
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
- struct ieee80211_conf *conf = &local->hw.conf;
-
- conf->quiet_duration = param->u.quiet.duration;
- conf->quiet_offset = param->u.quiet.offset;
- conf->quiet_period = param->u.quiet.period;
- return 0;
-}
-
-
-static int ieee80211_ioctl_set_radar_params(struct net_device *dev,
- struct prism2_hostapd_param *param)
-{
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
- struct ieee80211_conf *conf = &local->hw.conf;
-
- conf->radar_firpwr_threshold = param->u.radar.radar_firpwr_threshold;
- conf->radar_rssi_threshold = param->u.radar.radar_rssi_threshold;
- conf->pulse_height_threshold = param->u.radar.pulse_height_threshold;
- conf->pulse_rssi_threshold = param->u.radar.pulse_rssi_threshold;
- conf->pulse_inband_threshold = param->u.radar.pulse_inband_threshold;
- return 0;
-}
-
-
static int ieee80211_ioctl_priv_hostapd(struct net_device *dev,
struct iw_point *p)
{
@@ -1360,15 +1309,6 @@ static int ieee80211_ioctl_priv_hostapd(
case PRISM2_STA_GET_STATE:
ret = ieee80211_ioctl_sta_get_state(dev, param);
break;
- case PRISM2_HOSTAPD_MLME:
- ret = ieee80211_ioctl_mlme(dev, param);
- break;
- case PRISM2_HOSTAPD_SET_RADAR_PARAMS:
- ret = ieee80211_ioctl_set_radar_params(dev, param);
- break;
- case PRISM2_HOSTAPD_SET_QUIET_PARAMS:
- ret = ieee80211_ioctl_set_quiet_params(dev, param);
- break;
default:
ret = -EOPNOTSUPP;
break;
@@ -2206,12 +2146,6 @@ static int ieee80211_ioctl_prism2_param(
local->key_tx_rx_threshold = value;
break;
- case PRISM2_PARAM_RADAR_DETECT:
- local->hw.conf.radar_detect = value;
- break;
- case PRISM2_PARAM_SPECTRUM_MGMT:
- local->hw.conf.spect_mgmt = value;
- break;
case PRISM2_PARAM_MGMT_IF:
if (value == 1) {
if (!local->apdev)
--- wireless-dev.orig/include/net/mac80211.h 2007-08-15 14:08:02.996516958 +0200
+++ wireless-dev/include/net/mac80211.h 2007-08-15 14:09:54.926516958 +0200
@@ -298,19 +298,6 @@ struct ieee80211_conf {
/* 0 = default/diversity, 1 = Ant0, 2 = Ant1 */
u8 antenna_sel_tx;
u8 antenna_sel_rx;
-
- /* Following five fields are used for IEEE 802.11H */
- unsigned int radar_detect;
- unsigned int spect_mgmt;
- unsigned int quiet_duration; /* duration of quiet period */
- unsigned int quiet_offset; /* how far into the beacon is the quiet
- * period */
- unsigned int quiet_period;
- u8 radar_firpwr_threshold;
- u8 radar_rssi_threshold;
- u8 pulse_height_threshold;
- u8 pulse_rssi_threshold;
- u8 pulse_inband_threshold;
};
/**
--
^ permalink raw reply [flat|nested] 43+ messages in thread* [PATCH 10/20] mac80211: remove unused ioctls (5)
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (8 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 09/20] mac80211: remove unused ioctls (4) Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-15 14:49 ` [PATCH 11/20] mac80211: remove PRISM2_HOSTAPD_SET_GENERIC_INFO_ELEM Johannes Berg
` (9 subsequent siblings)
19 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
The ioctls
* PRISM2_HOSTAPD_GET_DOT11COUNTERSTABLE
* PRISM2_HOSTAPD_GET_LOAD_STATS
* PRISM2_HOSTAPD_GET_TX_STATS
* PRISM2_HOSTAPD_SCAN_REQ
* PRISM2_STA_GET_STATE
* PRISM2_HOSTAPD_FLUSH_IFS
are not used by hostapd or wpa_supplicant.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/hostapd_ioctl.h | 39 -------------
net/mac80211/ieee80211_ioctl.c | 120 -----------------------------------------
2 files changed, 159 deletions(-)
--- wireless-dev.orig/net/mac80211/hostapd_ioctl.h 2007-08-15 14:09:54.916516958 +0200
+++ wireless-dev/net/mac80211/hostapd_ioctl.h 2007-08-15 14:11:26.306516958 +0200
@@ -61,17 +61,11 @@ enum {
PRISM2_HOSTAPD_SET_RATE_SETS = 1005,
PRISM2_HOSTAPD_ADD_IF = 1006,
PRISM2_HOSTAPD_REMOVE_IF = 1007,
- PRISM2_HOSTAPD_GET_DOT11COUNTERSTABLE = 1008,
- PRISM2_HOSTAPD_GET_LOAD_STATS = 1009,
PRISM2_HOSTAPD_SET_STA_VLAN = 1010,
PRISM2_HOSTAPD_SET_GENERIC_INFO_ELEM = 1011,
PRISM2_HOSTAPD_SET_CHANNEL_FLAG = 1012,
PRISM2_HOSTAPD_SET_REGULATORY_DOMAIN = 1013,
PRISM2_HOSTAPD_SET_TX_QUEUE_PARAMS = 1014,
- PRISM2_HOSTAPD_GET_TX_STATS = 1016,
- PRISM2_HOSTAPD_SCAN_REQ = 1019,
- PRISM2_STA_GET_STATE = 1020,
- PRISM2_HOSTAPD_FLUSH_IFS = 1021,
};
#define PRISM2_HOSTAPD_MAX_BUF_SIZE 2048
@@ -154,24 +148,6 @@ struct prism2_hostapd_param {
u8 name[IFNAMSIZ];
u8 data[0] ALIGNED;
} if_info;
- struct dot11_counters {
- u32 dot11TransmittedFragmentCount;
- u32 dot11MulticastTransmittedFrameCount;
- u32 dot11FailedCount;
- u32 dot11ReceivedFragmentCount;
- u32 dot11MulticastReceivedFrameCount;
- u32 dot11FCSErrorCount;
- u32 dot11TransmittedFrameCount;
- u32 dot11WEPUndecryptableCount;
- u32 dot11ACKFailureCount;
- u32 dot11RTSFailureCount;
- u32 dot11RTSSuccessCount;
- } dot11CountersTable;
- struct {
-#define LOAD_STATS_CLEAR BIT(1)
- u32 flags;
- u32 channel_use;
- } get_load_stats;
struct {
char vlan_name[IFNAMSIZ];
int vlan_id;
@@ -198,21 +174,6 @@ struct prism2_hostapd_param {
u32 burst_time; /* maximum burst time in 0.1 ms, i.e.,
* 10 = 1 ms */
} tx_queue_params;
- struct ieee80211_tx_stats {
- struct {
- unsigned int len; /* num packets in queue */
- unsigned int limit; /* queue len (soft) limit
- */
- unsigned int count; /* total num frames sent */
- } data[4];
- } get_tx_stats;
- struct {
- u8 ssid_len;
- u8 ssid[0] ALIGNED;
- } scan_req;
- struct {
- u32 state;
- } sta_get_state;
struct {
u8 dummy[80]; /* Make sizeof() this struct large enough
* with some compiler versions. */
--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:10:51.536516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:11:26.316516958 +0200
@@ -316,38 +316,6 @@ static int ieee80211_ioctl_remove_sta(st
}
-static int ieee80211_ioctl_get_dot11counterstable(struct net_device *dev,
- struct prism2_hostapd_param *param)
-{
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
- struct ieee80211_low_level_stats stats;
-
- memset(&stats, 0, sizeof(stats));
- if (local->ops->get_stats)
- local->ops->get_stats(local_to_hw(local), &stats);
- param->u.dot11CountersTable.dot11TransmittedFragmentCount =
- local->dot11TransmittedFragmentCount;
- param->u.dot11CountersTable.dot11MulticastTransmittedFrameCount =
- local->dot11MulticastTransmittedFrameCount;
- param->u.dot11CountersTable.dot11ReceivedFragmentCount =
- local->dot11ReceivedFragmentCount;
- param->u.dot11CountersTable.dot11MulticastReceivedFrameCount =
- local->dot11MulticastReceivedFrameCount;
- param->u.dot11CountersTable.dot11TransmittedFrameCount =
- local->dot11TransmittedFrameCount;
- param->u.dot11CountersTable.dot11FCSErrorCount =
- stats.dot11FCSErrorCount;
- param->u.dot11CountersTable.dot11ACKFailureCount =
- stats.dot11ACKFailureCount;
- param->u.dot11CountersTable.dot11RTSFailureCount =
- stats.dot11RTSFailureCount;
- param->u.dot11CountersTable.dot11RTSSuccessCount =
- stats.dot11RTSSuccessCount;
-
- return 0;
-}
-
-
static int ieee80211_ioctl_get_info_sta(struct net_device *dev,
struct prism2_hostapd_param *param)
{
@@ -995,54 +963,6 @@ static int ieee80211_ioctl_remove_if(str
return ieee80211_if_remove(dev, param->u.if_info.name, type);
}
-static int ieee80211_ioctl_scan_req(struct net_device *dev,
- struct prism2_hostapd_param *param,
- int param_len)
-{
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
- u8 *pos = param->u.scan_req.ssid;
- int left = param_len - ((u8 *) pos - (u8 *) param);
- int len = param->u.scan_req.ssid_len;
-
- if (local->user_space_mlme)
- return -EOPNOTSUPP;
-
- if (!netif_running(dev))
- return -ENETDOWN;
-
- if (left < len || len > IEEE80211_MAX_SSID_LEN)
- return -EINVAL;
-
- return ieee80211_sta_req_scan(dev, pos, len);
-}
-
-
-static int ieee80211_ioctl_sta_get_state(struct net_device *dev,
- struct prism2_hostapd_param *param)
-{
- struct ieee80211_sub_if_data *sdata;
-
- sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- if (sdata->type != IEEE80211_IF_TYPE_STA &&
- sdata->type != IEEE80211_IF_TYPE_IBSS)
- return -EINVAL;
- param->u.sta_get_state.state = sdata->u.sta.state;
- return 0;
-}
-
-
-static int ieee80211_ioctl_get_load_stats(struct net_device *dev,
- struct prism2_hostapd_param *param)
-{
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
-
- param->u.get_load_stats.channel_use = local->channel_use;
-/* if (param->u.get_load_stats.flags & LOAD_STATS_CLEAR)
- local->channel_use = 0; */ /* now it's not raw counter */
-
- return 0;
-}
-
static int ieee80211_ioctl_set_sta_vlan(struct net_device *dev,
struct prism2_hostapd_param *param)
@@ -1159,31 +1079,6 @@ ieee80211_ioctl_set_tx_queue_params(stru
}
-static int ieee80211_ioctl_get_tx_stats(struct net_device *dev,
- struct prism2_hostapd_param *param)
-{
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
- struct ieee80211_tx_queue_stats stats;
- int ret, i;
-
- if (!local->ops->get_tx_stats)
- return -EOPNOTSUPP;
-
- memset(&stats, 0, sizeof(stats));
- ret = local->ops->get_tx_stats(local_to_hw(local), &stats);
- if (ret)
- return ret;
-
- for (i = 0; i < 4; i++) {
- param->u.get_tx_stats.data[i].len = stats.data[i].len;
- param->u.get_tx_stats.data[i].limit = stats.data[i].limit;
- param->u.get_tx_stats.data[i].count = stats.data[i].count;
- }
-
- return 0;
-}
-
-
static int ieee80211_ioctl_set_channel_flag(struct net_device *dev,
struct prism2_hostapd_param *param)
{
@@ -1278,12 +1173,6 @@ static int ieee80211_ioctl_priv_hostapd(
case PRISM2_HOSTAPD_REMOVE_IF:
ret = ieee80211_ioctl_remove_if(dev, param);
break;
- case PRISM2_HOSTAPD_GET_DOT11COUNTERSTABLE:
- ret = ieee80211_ioctl_get_dot11counterstable(dev, param);
- break;
- case PRISM2_HOSTAPD_GET_LOAD_STATS:
- ret = ieee80211_ioctl_get_load_stats(dev, param);
- break;
case PRISM2_HOSTAPD_SET_STA_VLAN:
ret = ieee80211_ioctl_set_sta_vlan(dev, param);
break;
@@ -1300,15 +1189,6 @@ static int ieee80211_ioctl_priv_hostapd(
case PRISM2_HOSTAPD_SET_TX_QUEUE_PARAMS:
ret = ieee80211_ioctl_set_tx_queue_params(dev, param);
break;
- case PRISM2_HOSTAPD_GET_TX_STATS:
- ret = ieee80211_ioctl_get_tx_stats(dev, param);
- break;
- case PRISM2_HOSTAPD_SCAN_REQ:
- ret = ieee80211_ioctl_scan_req(dev, param, p->length);
- break;
- case PRISM2_STA_GET_STATE:
- ret = ieee80211_ioctl_sta_get_state(dev, param);
- break;
default:
ret = -EOPNOTSUPP;
break;
--
^ permalink raw reply [flat|nested] 43+ messages in thread* [PATCH 11/20] mac80211: remove PRISM2_HOSTAPD_SET_GENERIC_INFO_ELEM
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (9 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 10/20] mac80211: remove unused ioctls (5) Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-15 14:49 ` [PATCH 12/20] mac80211: fix preamble setting Johannes Berg
` (8 subsequent siblings)
19 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
This is now unused in hostapd/wpa_supplicant, it uses SIOCSIWGENIE.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/hostapd_ioctl.h | 5 -----
net/mac80211/ieee80211_ioctl.c | 20 --------------------
2 files changed, 25 deletions(-)
--- wireless-dev.orig/net/mac80211/hostapd_ioctl.h 2007-08-15 14:11:26.306516958 +0200
+++ wireless-dev/net/mac80211/hostapd_ioctl.h 2007-08-15 14:11:39.886516958 +0200
@@ -62,7 +62,6 @@ enum {
PRISM2_HOSTAPD_ADD_IF = 1006,
PRISM2_HOSTAPD_REMOVE_IF = 1007,
PRISM2_HOSTAPD_SET_STA_VLAN = 1010,
- PRISM2_HOSTAPD_SET_GENERIC_INFO_ELEM = 1011,
PRISM2_HOSTAPD_SET_CHANNEL_FLAG = 1012,
PRISM2_HOSTAPD_SET_REGULATORY_DOMAIN = 1013,
PRISM2_HOSTAPD_SET_TX_QUEUE_PARAMS = 1014,
@@ -153,10 +152,6 @@ struct prism2_hostapd_param {
int vlan_id;
} set_sta_vlan;
struct {
- u8 len;
- u8 data[0] ALIGNED;
- } set_generic_info_elem;
- struct {
u16 mode; /* MODE_* */
u16 chan;
u32 flag;
--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:11:26.316516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:11:39.896516958 +0200
@@ -1028,22 +1028,6 @@ static int ieee80211_set_gen_ie(struct n
}
-static int
-ieee80211_ioctl_set_generic_info_elem(struct net_device *dev,
- struct prism2_hostapd_param *param,
- int param_len)
-{
- u8 *pos = param->u.set_generic_info_elem.data;
- int left = param_len - ((u8 *) pos - (u8 *) param);
- int len = param->u.set_generic_info_elem.len;
-
- if (left < len)
- return -EINVAL;
-
- return ieee80211_set_gen_ie(dev, pos, len);
-}
-
-
static int ieee80211_ioctl_set_regulatory_domain(struct net_device *dev,
struct prism2_hostapd_param *param)
{
@@ -1176,10 +1160,6 @@ static int ieee80211_ioctl_priv_hostapd(
case PRISM2_HOSTAPD_SET_STA_VLAN:
ret = ieee80211_ioctl_set_sta_vlan(dev, param);
break;
- case PRISM2_HOSTAPD_SET_GENERIC_INFO_ELEM:
- ret = ieee80211_ioctl_set_generic_info_elem(dev, param,
- p->length);
- break;
case PRISM2_HOSTAPD_SET_CHANNEL_FLAG:
ret = ieee80211_ioctl_set_channel_flag(dev, param);
break;
--
^ permalink raw reply [flat|nested] 43+ messages in thread* [PATCH 12/20] mac80211: fix preamble setting
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (10 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 11/20] mac80211: remove PRISM2_HOSTAPD_SET_GENERIC_INFO_ELEM Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-15 14:49 ` [PATCH 13/20] mac80211: remove scan struct from hostapd_param Johannes Berg
` (7 subsequent siblings)
19 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless, Daniel Drake
It looks like in commit 28487a90 the condition was unintentionally
negated by moving some code, fix it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Daniel Drake <dsd@gentoo.org>
---
net/mac80211/ieee80211_ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c 2007-08-15 13:39:52.366520121 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c 2007-08-15 13:39:52.926520121 +0200
@@ -1962,7 +1962,7 @@ static int ieee80211_ioctl_prism2_param(
break;
case PRISM2_PARAM_PREAMBLE:
- if (sdata->type != IEEE80211_IF_TYPE_AP) {
+ if (sdata->type == IEEE80211_IF_TYPE_AP) {
sdata->short_preamble = !!value;
ieee80211_erp_info_change_notify(dev, IEEE80211_ERP_CHANGE_PREAMBLE);
} else {
--
^ permalink raw reply [flat|nested] 43+ messages in thread* [PATCH 13/20] mac80211: remove scan struct from hostapd_param
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (11 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 12/20] mac80211: fix preamble setting Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-15 14:49 ` [PATCH 14/20] mac80211: kill key_mgmt variable, use privacy_enabled Johannes Berg
` (6 subsequent siblings)
19 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
This hasn't been used for quite a while.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/hostapd_ioctl.h | 8 --------
1 file changed, 8 deletions(-)
--- wireless-dev.orig/net/mac80211/hostapd_ioctl.h 2007-08-15 14:11:39.886516958 +0200
+++ wireless-dev/net/mac80211/hostapd_ioctl.h 2007-08-15 14:11:52.406516958 +0200
@@ -128,14 +128,6 @@ struct prism2_hostapd_param {
u8 data[0] ALIGNED; /* num_modes * feature data */
} hw_features;
struct {
- u8 now;
- s8 our_mode_only;
- s16 last_rx;
- u16 channel;
- s16 interval; /* seconds */
- s32 listen; /* microseconds */
- } scan;
- struct {
u16 mode; /* MODE_* */
u16 num_supported_rates;
u16 num_basic_rates;
--
^ permalink raw reply [flat|nested] 43+ messages in thread* [PATCH 14/20] mac80211: kill key_mgmt variable, use privacy_enabled
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (12 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 13/20] mac80211: remove scan struct from hostapd_param Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-17 1:09 ` Johannes Berg
2007-08-18 3:59 ` [PATCH " Jouni Malinen
2007-08-15 14:49 ` [PATCH 15/20] mac80211: refactor event sending Johannes Berg
` (5 subsequent siblings)
19 siblings, 2 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
The key_mgmt variable for STA interfaces doesn't seem well-defined
nor do we actually use the values other than "NONE", so change it to
be named better.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/hostapd_ioctl.h | 8 --------
net/mac80211/ieee80211_i.h | 2 +-
net/mac80211/ieee80211_ioctl.c | 24 +++++++++---------------
net/mac80211/ieee80211_sta.c | 2 +-
4 files changed, 11 insertions(+), 25 deletions(-)
--- wireless-dev.orig/net/mac80211/ieee80211_i.h 2007-08-15 14:09:54.916516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_i.h 2007-08-15 14:11:55.656516958 +0200
@@ -277,7 +277,7 @@ struct ieee80211_if_sta {
unsigned long request;
struct sk_buff_head skb_queue;
- int key_mgmt;
+ int privacy_enabled;
unsigned long last_probe;
#define IEEE80211_AUTH_ALG_OPEN BIT(0)
--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:11:49.086516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:11:55.666516958 +0200
@@ -2245,22 +2245,16 @@ static int ieee80211_ioctl_siwauth(struc
ret = -EINVAL;
else {
/*
- * TODO: sdata->u.sta.key_mgmt does not match with WE18
- * value completely; could consider modifying this to
- * be closer to WE18. For now, this value is not really
- * used for anything else than Privacy matching, so the
- * current code here should be more or less OK.
+ * What are the semantics in wext supposed to be?
+ *
+ * Don't bother figuring that out... It's wext after
+ * all so figuring it out will most likely require a
+ * moderate amount of clairvoyance.
+ *
+ * TODO: remove in favour of something well-defined
+ * in cfg80211/nl80211.
*/
- if (data->value & IW_AUTH_KEY_MGMT_802_1X) {
- sdata->u.sta.key_mgmt =
- IEEE80211_KEY_MGMT_WPA_EAP;
- } else if (data->value & IW_AUTH_KEY_MGMT_PSK) {
- sdata->u.sta.key_mgmt =
- IEEE80211_KEY_MGMT_WPA_PSK;
- } else {
- sdata->u.sta.key_mgmt =
- IEEE80211_KEY_MGMT_NONE;
- }
+ sdata->u.sta.privacy_enabled = !!data->value;
}
break;
case IW_AUTH_80211_AUTH_ALG:
--- wireless-dev.orig/net/mac80211/ieee80211_sta.c 2007-08-15 14:08:54.646516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_sta.c 2007-08-15 14:11:55.676516958 +0200
@@ -1168,7 +1168,7 @@ static int ieee80211_privacy_mismatch(st
struct ieee80211_sta_bss *bss;
int res = 0;
- if (!ifsta || ifsta->key_mgmt != IEEE80211_KEY_MGMT_NONE)
+ if (!ifsta || !ifsta->privacy_enabled)
return 0;
bss = ieee80211_rx_bss_get(dev, ifsta->bssid);
--- wireless-dev.orig/net/mac80211/hostapd_ioctl.h 2007-08-15 14:11:52.406516958 +0200
+++ wireless-dev/net/mac80211/hostapd_ioctl.h 2007-08-15 14:11:55.676516958 +0200
@@ -180,14 +180,6 @@ struct prism2_hostapd_param {
#define HOSTAP_HW_FLAG_NULLFUNC_OK BIT(0)
-enum {
- IEEE80211_KEY_MGMT_NONE = 0,
- IEEE80211_KEY_MGMT_IEEE8021X = 1,
- IEEE80211_KEY_MGMT_WPA_PSK = 2,
- IEEE80211_KEY_MGMT_WPA_EAP = 3,
-};
-
-
/* Data structures used for get_hw_features ioctl */
struct hostapd_ioctl_hw_modes_hdr {
int mode;
--
^ permalink raw reply [flat|nested] 43+ messages in thread* Re: [PATCH 14/20] mac80211: kill key_mgmt variable, use privacy_enabled
2007-08-15 14:49 ` [PATCH 14/20] mac80211: kill key_mgmt variable, use privacy_enabled Johannes Berg
@ 2007-08-17 1:09 ` Johannes Berg
2007-08-17 11:27 ` [PATCH v2 " Johannes Berg
2007-08-18 3:59 ` [PATCH " Jouni Malinen
1 sibling, 1 reply; 43+ messages in thread
From: Johannes Berg @ 2007-08-17 1:09 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 256 bytes --]
On Wed, 2007-08-15 at 16:49 +0200, Johannes Berg wrote:
> - if (!ifsta || ifsta->key_mgmt != IEEE80211_KEY_MGMT_NONE)
> + if (!ifsta || !ifsta->privacy_enabled)
^ be gone!
That privacy_enabled test is inverted.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread* [PATCH v2 14/20] mac80211: kill key_mgmt variable, use privacy_enabled
2007-08-17 1:09 ` Johannes Berg
@ 2007-08-17 11:27 ` Johannes Berg
0 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-17 11:27 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
The key_mgmt variable for STA interfaces doesn't seem well-defined
nor do we actually use the values other than "NONE", so change it to
be named better.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/hostapd_ioctl.h | 8 --------
net/mac80211/ieee80211_i.h | 2 +-
net/mac80211/ieee80211_ioctl.c | 24 +++++++++---------------
net/mac80211/ieee80211_sta.c | 2 +-
4 files changed, 11 insertions(+), 25 deletions(-)
--- wireless-dev.orig/net/mac80211/ieee80211_i.h 2007-08-16 23:26:41.153466559 +0200
+++ wireless-dev/net/mac80211/ieee80211_i.h 2007-08-16 23:49:41.323466559 +0200
@@ -277,7 +277,7 @@ struct ieee80211_if_sta {
unsigned long request;
struct sk_buff_head skb_queue;
- int key_mgmt;
+ int privacy_enabled;
unsigned long last_probe;
#define IEEE80211_AUTH_ALG_OPEN BIT(0)
--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c 2007-08-16 23:26:36.253466559 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c 2007-08-16 23:49:36.263466559 +0200
@@ -2245,22 +2245,16 @@ static int ieee80211_ioctl_siwauth(struc
ret = -EINVAL;
else {
/*
- * TODO: sdata->u.sta.key_mgmt does not match with WE18
- * value completely; could consider modifying this to
- * be closer to WE18. For now, this value is not really
- * used for anything else than Privacy matching, so the
- * current code here should be more or less OK.
+ * What are the semantics in wext supposed to be?
+ *
+ * Don't bother figuring that out... It's wext after
+ * all so figuring it out will most likely require a
+ * moderate amount of clairvoyance.
+ *
+ * TODO: remove in favour of something well-defined
+ * in cfg80211/nl80211.
*/
- if (data->value & IW_AUTH_KEY_MGMT_802_1X) {
- sdata->u.sta.key_mgmt =
- IEEE80211_KEY_MGMT_WPA_EAP;
- } else if (data->value & IW_AUTH_KEY_MGMT_PSK) {
- sdata->u.sta.key_mgmt =
- IEEE80211_KEY_MGMT_WPA_PSK;
- } else {
- sdata->u.sta.key_mgmt =
- IEEE80211_KEY_MGMT_NONE;
- }
+ sdata->u.sta.privacy_enabled = !!data->value;
}
break;
case IW_AUTH_80211_AUTH_ALG:
--- wireless-dev.orig/net/mac80211/ieee80211_sta.c 2007-08-16 23:26:38.253466559 +0200
+++ wireless-dev/net/mac80211/ieee80211_sta.c 2007-08-16 23:50:29.983466559 +0200
@@ -1168,7 +1168,7 @@ static int ieee80211_privacy_mismatch(st
struct ieee80211_sta_bss *bss;
int res = 0;
- if (!ifsta || ifsta->key_mgmt != IEEE80211_KEY_MGMT_NONE)
+ if (!ifsta || ifsta->privacy_enabled)
return 0;
bss = ieee80211_rx_bss_get(dev, ifsta->bssid);
--- wireless-dev.orig/net/mac80211/hostapd_ioctl.h 2007-08-16 23:26:35.603466559 +0200
+++ wireless-dev/net/mac80211/hostapd_ioctl.h 2007-08-16 23:49:35.443466559 +0200
@@ -180,14 +180,6 @@ struct prism2_hostapd_param {
#define HOSTAP_HW_FLAG_NULLFUNC_OK BIT(0)
-enum {
- IEEE80211_KEY_MGMT_NONE = 0,
- IEEE80211_KEY_MGMT_IEEE8021X = 1,
- IEEE80211_KEY_MGMT_WPA_PSK = 2,
- IEEE80211_KEY_MGMT_WPA_EAP = 3,
-};
-
-
/* Data structures used for get_hw_features ioctl */
struct hostapd_ioctl_hw_modes_hdr {
int mode;
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PATCH 14/20] mac80211: kill key_mgmt variable, use privacy_enabled
2007-08-15 14:49 ` [PATCH 14/20] mac80211: kill key_mgmt variable, use privacy_enabled Johannes Berg
2007-08-17 1:09 ` Johannes Berg
@ 2007-08-18 3:59 ` Jouni Malinen
2007-08-18 9:03 ` Johannes Berg
1 sibling, 1 reply; 43+ messages in thread
From: Jouni Malinen @ 2007-08-18 3:59 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
On Wed, Aug 15, 2007 at 04:49:34PM +0200, Johannes Berg wrote:
> The key_mgmt variable for STA interfaces doesn't seem well-defined
> nor do we actually use the values other than "NONE", so change it to
> be named better.
Most drivers should not need key_mgmt configuration. The only exception
that I'm aware of is firmware designs that insist on generating WPA/RSN
IE internally. None of them are likely to be using mac80211, though.
> + * What are the semantics in wext supposed to be?
> + *
> + * Don't bother figuring that out... It's wext after
> + * all so figuring it out will most likely require a
> + * moderate amount of clairvoyance.
Isn't this a bit unnecessary?
> + sdata->u.sta.privacy_enabled = !!data->value;
This looks a bit odd, though, taken into account that this is coming
from IW_AUTH_KEY_MGMT and not IW_AUTH_PRIVACY_INVOKED.. It would
probably be better to just remove all the crab from here can ignore the
IW_AUTH_KEY_MGMT value in mac80211. The only place that actually used it
in the client code (mixed cell configuration) had already been broken,
so this could all be just removed completely unless someone has plans on
fixing privacy mismatch detection.
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PATCH 14/20] mac80211: kill key_mgmt variable, use privacy_enabled
2007-08-18 3:59 ` [PATCH " Jouni Malinen
@ 2007-08-18 9:03 ` Johannes Berg
0 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-18 9:03 UTC (permalink / raw)
To: Jouni Malinen; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 725 bytes --]
On Fri, 2007-08-17 at 20:59 -0700, Jouni Malinen wrote:
> This looks a bit odd, though, taken into account that this is coming
> from IW_AUTH_KEY_MGMT and not IW_AUTH_PRIVACY_INVOKED.. It would
> probably be better to just remove all the crab from here can ignore the
> IW_AUTH_KEY_MGMT value in mac80211. The only place that actually used it
> in the client code (mixed cell configuration) had already been broken,
> so this could all be just removed completely unless someone has plans on
> fixing privacy mismatch detection.
Yeah, it should probably be called "key_management_enabled". However,
privacy mismatch detection does work for WPA, just not for Volker with
dynamic WEP for some reason.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PATCH 15/20] mac80211: refactor event sending
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (13 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 14/20] mac80211: kill key_mgmt variable, use privacy_enabled Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-15 14:49 ` [PATCH 16/20] mac80211: ratelimit some RX messages Johannes Berg
` (4 subsequent siblings)
19 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
Create a new file event.c that will contain code to send mac/mlme
events to userspace. For now put the Michael MIC failure condition
into it and remove sending of that condition via the management
interface, hostapd interestingly doesn't do anything when it gets
such a packet besides printing a message, it reacts only on the
private iwevent.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/Makefile | 1 +
net/mac80211/event.c | 36 ++++++++++++++++++++++++++++++++++++
net/mac80211/ieee80211_i.h | 2 ++
net/mac80211/rx.c | 37 ++++++-------------------------------
net/mac80211/wpa.c | 34 ++++------------------------------
5 files changed, 49 insertions(+), 61 deletions(-)
--- wireless-dev.orig/net/mac80211/ieee80211_i.h 2007-08-15 14:11:55.656516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_i.h 2007-08-15 14:13:25.946516958 +0200
@@ -929,5 +929,7 @@ u8 *ieee80211_get_bssid(struct ieee80211
int ieee80211_is_eapol(const struct sk_buff *skb);
int ieee80211_frame_duration(struct ieee80211_local *local, size_t len,
int rate, int erp, int short_preamble);
+void mac80211_ev_michael_mic_failure(struct net_device *dev, int keyidx,
+ struct ieee80211_hdr *hdr);
#endif /* IEEE80211_I_H */
--- wireless-dev.orig/net/mac80211/wpa.c 2007-08-15 14:04:47.386516958 +0200
+++ wireless-dev/net/mac80211/wpa.c 2007-08-15 14:13:25.946516958 +0200
@@ -11,10 +11,8 @@
#include <linux/slab.h>
#include <linux/skbuff.h>
#include <linux/compiler.h>
-#include <net/iw_handler.h>
-
#include <net/mac80211.h>
-#include "ieee80211_common.h"
+
#include "ieee80211_i.h"
#include "michael.h"
#include "tkip.h"
@@ -245,33 +243,9 @@ ieee80211_rx_h_michael_mic_verify(struct
printk(" (%d)\n", authenticator);
#endif /* CONFIG_HOSTAPD_WPA_TESTING */
- do {
- struct ieee80211_hdr *hdr;
- union iwreq_data wrqu;
- char *buf = kmalloc(128, GFP_ATOMIC);
- if (!buf)
- break;
-
- /* TODO: needed parameters: count, key type, TSC */
- hdr = (struct ieee80211_hdr *) skb->data;
- sprintf(buf, "MLME-MICHAELMICFAILURE.indication("
- "keyid=%d %scast addr=" MAC_FMT ")",
- rx->key->keyidx,
- hdr->addr1[0] & 0x01 ? "broad" : "uni",
- MAC_ARG(hdr->addr2));
- memset(&wrqu, 0, sizeof(wrqu));
- wrqu.data.length = strlen(buf);
- wireless_send_event(rx->dev, IWEVCUSTOM, &wrqu, buf);
- kfree(buf);
- } while (0);
-
- if (!rx->local->apdev)
- return TXRX_DROP;
-
- ieee80211_rx_mgmt(rx->local, rx->skb, rx->u.rx.status,
- ieee80211_msg_michael_mic_failure);
-
- return TXRX_QUEUED;
+ mac80211_ev_michael_mic_failure(rx->dev, rx->key->keyidx,
+ (void*) skb->data);
+ return TXRX_DROP;
}
remove_mic:
--- wireless-dev.orig/net/mac80211/rx.c 2007-08-15 14:07:25.946516958 +0200
+++ wireless-dev/net/mac80211/rx.c 2007-08-15 14:13:25.946516958 +0200
@@ -13,7 +13,6 @@
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
-#include <net/iw_handler.h>
#include <net/mac80211.h>
#include <net/ieee80211_radiotap.h>
@@ -1295,18 +1294,15 @@ static void ieee80211_rx_michael_mic_rep
}
if ((rx->local->hw.flags & IEEE80211_HW_WEP_INCLUDE_IV) &&
- rx->sdata->type == IEEE80211_IF_TYPE_AP) {
- keyidx = ieee80211_wep_get_keyidx(rx->skb);
+ rx->sdata->type == IEEE80211_IF_TYPE_AP && keyidx) {
/* AP with Pairwise keys support should never receive Michael
* MIC errors for non-zero keyidx because these are reserved
* for group keys and only the AP is sending real multicast
* frames in BSS. */
- if (keyidx) {
- printk(KERN_DEBUG "%s: ignored Michael MIC error for "
- "a frame with non-zero keyidx (%d) (src " MAC_FMT
- ")\n", dev->name, keyidx, MAC_ARG(hdr->addr2));
- goto ignore;
- }
+ printk(KERN_DEBUG "%s: ignored Michael MIC error for "
+ "a frame with non-zero keyidx (%d) (src " MAC_FMT
+ ")\n", dev->name, keyidx, MAC_ARG(hdr->addr2));
+ goto ignore;
}
if ((rx->fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA &&
@@ -1319,32 +1315,11 @@ static void ieee80211_rx_michael_mic_rep
goto ignore;
}
- do {
- union iwreq_data wrqu;
- char *buf = kmalloc(128, GFP_ATOMIC);
- if (!buf)
- break;
-
- /* TODO: needed parameters: count, key type, TSC */
- sprintf(buf, "MLME-MICHAELMICFAILURE.indication("
- "keyid=%d %scast addr=" MAC_FMT ")",
- keyidx, hdr->addr1[0] & 0x01 ? "broad" : "uni",
- MAC_ARG(hdr->addr2));
- memset(&wrqu, 0, sizeof(wrqu));
- wrqu.data.length = strlen(buf);
- wireless_send_event(rx->dev, IWEVCUSTOM, &wrqu, buf);
- kfree(buf);
- } while (0);
-
/* TODO: consider verifying the MIC error report with software
* implementation if we get too many spurious reports from the
* hardware. */
- if (!rx->local->apdev)
- goto ignore;
- ieee80211_rx_mgmt(rx->local, rx->skb, rx->u.rx.status,
- ieee80211_msg_michael_mic_failure);
- return;
+ mac80211_ev_michael_mic_failure(rx->dev, keyidx, hdr);
ignore:
dev_kfree_skb(rx->skb);
rx->skb = NULL;
--- wireless-dev.orig/net/mac80211/Makefile 2007-08-15 14:04:47.436516958 +0200
+++ wireless-dev/net/mac80211/Makefile 2007-08-15 14:13:25.946516958 +0200
@@ -22,4 +22,5 @@ mac80211-objs := \
tx.o \
key.o \
util.o \
+ event.o \
$(mac80211-objs-y)
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ wireless-dev/net/mac80211/event.c 2007-08-15 14:13:25.946516958 +0200
@@ -0,0 +1,36 @@
+/*
+ * mac80211 - events
+ */
+
+#include <linux/netdevice.h>
+#include <net/iw_handler.h>
+#include "ieee80211_i.h"
+
+/*
+ * indicate a failed Michael MIC to userspace; the passed packet
+ * (in the variable hdr) must be long enough to extract the TKIP
+ * fields like TSC
+ */
+void mac80211_ev_michael_mic_failure(struct net_device *dev, int keyidx,
+ struct ieee80211_hdr *hdr)
+{
+ union iwreq_data wrqu;
+ char *buf = kmalloc(128, GFP_ATOMIC);
+
+ if (buf) {
+ /* TODO: needed parameters: count, key type, TSC */
+ sprintf(buf, "MLME-MICHAELMICFAILURE.indication("
+ "keyid=%d %scast addr=" MAC_FMT ")",
+ keyidx, hdr->addr1[0] & 0x01 ? "broad" : "uni",
+ MAC_ARG(hdr->addr2));
+ memset(&wrqu, 0, sizeof(wrqu));
+ wrqu.data.length = strlen(buf);
+ wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf);
+ kfree(buf);
+ }
+
+ /*
+ * TODO: re-add support for sending MIC failure indication
+ * with all info via nl80211
+ */
+}
--
^ permalink raw reply [flat|nested] 43+ messages in thread* [PATCH 16/20] mac80211: ratelimit some RX messages
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (14 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 15/20] mac80211: refactor event sending Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-15 14:49 ` [PATCH 17/20] mac80211: avoid copying packets to interfaces that are down Johannes Berg
` (3 subsequent siblings)
19 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
Many if not all of these messages can be triggered by sending
a few rogue frames which is trivially done and then we overflow
our logs.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/rx.c | 134 ++++++++++++++++++++++++++++++++----------------------
1 file changed, 81 insertions(+), 53 deletions(-)
--- wireless-dev.orig/net/mac80211/rx.c 2007-08-15 14:13:25.946516958 +0200
+++ wireless-dev/net/mac80211/rx.c 2007-08-15 14:13:28.596516958 +0200
@@ -342,13 +342,16 @@ ieee80211_rx_h_load_key(struct ieee80211
if (!rx->key) {
if (!rx->u.rx.ra_match)
return TXRX_DROP;
- printk(KERN_DEBUG "%s: RX WEP frame with "
- "unknown keyidx %d (A1=" MAC_FMT " A2="
- MAC_FMT " A3=" MAC_FMT ")\n",
- rx->dev->name, keyidx,
- MAC_ARG(hdr->addr1),
- MAC_ARG(hdr->addr2),
- MAC_ARG(hdr->addr3));
+ if (net_ratelimit())
+ printk(KERN_DEBUG "%s: RX WEP frame "
+ "with unknown keyidx %d "
+ "(A1=" MAC_FMT
+ " A2=" MAC_FMT
+ " A3=" MAC_FMT ")\n",
+ rx->dev->name, keyidx,
+ MAC_ARG(hdr->addr1),
+ MAC_ARG(hdr->addr2),
+ MAC_ARG(hdr->addr3));
/*
* TODO: notify userspace about this
* via cfg/nl80211
@@ -528,16 +531,18 @@ ieee80211_rx_h_wep_decrypt(struct ieee80
return TXRX_CONTINUE;
if (!rx->key) {
- printk(KERN_DEBUG "%s: RX WEP frame, but no key set\n",
- rx->dev->name);
+ if (net_ratelimit())
+ printk(KERN_DEBUG "%s: RX WEP frame, but no key set\n",
+ rx->dev->name);
return TXRX_DROP;
}
if (!(rx->u.rx.status->flag & RX_FLAG_DECRYPTED) ||
rx->key->force_sw_encrypt) {
if (ieee80211_wep_decrypt(rx->local, rx->skb, rx->key)) {
- printk(KERN_DEBUG "%s: RX WEP frame, decrypt "
- "failed\n", rx->dev->name);
+ if (net_ratelimit())
+ printk(KERN_DEBUG "%s: RX WEP frame, decrypt "
+ "failed\n", rx->dev->name);
return TXRX_DROP;
}
} else if (rx->local->hw.flags & IEEE80211_HW_WEP_INCLUDE_IV) {
@@ -694,12 +699,15 @@ ieee80211_rx_h_defragment(struct ieee802
}
rpn = rx->key->u.ccmp.rx_pn[rx->u.rx.queue];
if (memcmp(pn, rpn, CCMP_PN_LEN) != 0) {
- printk(KERN_DEBUG "%s: defrag: CCMP PN not sequential"
- " A2=" MAC_FMT " PN=%02x%02x%02x%02x%02x%02x "
- "(expected %02x%02x%02x%02x%02x%02x)\n",
- rx->dev->name, MAC_ARG(hdr->addr2),
- rpn[0], rpn[1], rpn[2], rpn[3], rpn[4], rpn[5],
- pn[0], pn[1], pn[2], pn[3], pn[4], pn[5]);
+ if (net_ratelimit())
+ printk(KERN_DEBUG "%s: defrag: CCMP PN not "
+ "sequential A2=" MAC_FMT
+ " PN=%02x%02x%02x%02x%02x%02x "
+ "(expected %02x%02x%02x%02x%02x%02x)\n",
+ rx->dev->name, MAC_ARG(hdr->addr2),
+ rpn[0], rpn[1], rpn[2], rpn[3], rpn[4],
+ rpn[5], pn[0], pn[1], pn[2], pn[3],
+ pn[4], pn[5]);
return TXRX_DROP;
}
memcpy(entry->last_pn, pn, CCMP_PN_LEN);
@@ -877,8 +885,9 @@ ieee80211_rx_h_drop_unencrypted(struct i
(rx->key || rx->sdata->drop_unencrypted) &&
(rx->sdata->eapol == 0 ||
!ieee80211_is_eapol(rx->skb)))) {
- printk(KERN_DEBUG "%s: RX non-WEP frame, but expected "
- "encryption\n", rx->dev->name);
+ if (net_ratelimit())
+ printk(KERN_DEBUG "%s: RX non-WEP frame, but expected "
+ "encryption\n", rx->dev->name);
return TXRX_DROP;
}
return TXRX_CONTINUE;
@@ -969,17 +978,19 @@ ieee80211_rx_h_data_agg(struct ieee80211
* in local net stack and back to the wireless
* media */
skb2 = skb_copy(frame, GFP_ATOMIC);
- if (!skb2)
+ if (!skb2 && net_ratelimit())
printk(KERN_DEBUG "%s: failed to clone"
" multicast frame\n", dev->name);
} else {
struct sta_info *dsta;
dsta = sta_info_get(local, frame->data);
- if (dsta && !dsta->dev)
- printk(KERN_DEBUG "Station with null "
- "dev structure!\n");
- else if (dsta && dsta->dev == dev) {
+ if (dsta && !dsta->dev) {
+ if (net_ratelimit())
+ printk(KERN_DEBUG "Station "
+ "with null dev "
+ "structure!\n");
+ } else if (dsta && dsta->dev == dev) {
/* Destination station is associated
* to this AP, so send the frame
* directly to it and do not pass
@@ -1059,10 +1070,15 @@ ieee80211_rx_h_data(struct ieee80211_txr
if (unlikely(sdata->type != IEEE80211_IF_TYPE_AP &&
sdata->type != IEEE80211_IF_TYPE_VLAN)) {
- printk(KERN_DEBUG "%s: dropped ToDS frame (BSSID="
- MAC_FMT " SA=" MAC_FMT " DA=" MAC_FMT ")\n",
- dev->name, MAC_ARG(hdr->addr1),
- MAC_ARG(hdr->addr2), MAC_ARG(hdr->addr3));
+ if (net_ratelimit())
+ printk(KERN_DEBUG "%s: dropped ToDS frame "
+ "(BSSID=" MAC_FMT
+ " SA=" MAC_FMT
+ " DA=" MAC_FMT ")\n",
+ dev->name,
+ MAC_ARG(hdr->addr1),
+ MAC_ARG(hdr->addr2),
+ MAC_ARG(hdr->addr3));
return TXRX_DROP;
}
break;
@@ -1072,12 +1088,16 @@ ieee80211_rx_h_data(struct ieee80211_txr
memcpy(src, hdr->addr4, ETH_ALEN);
if (unlikely(sdata->type != IEEE80211_IF_TYPE_WDS)) {
- printk(KERN_DEBUG "%s: dropped FromDS&ToDS frame (RA="
- MAC_FMT " TA=" MAC_FMT " DA=" MAC_FMT " SA="
- MAC_FMT ")\n",
- rx->dev->name, MAC_ARG(hdr->addr1),
- MAC_ARG(hdr->addr2), MAC_ARG(hdr->addr3),
- MAC_ARG(hdr->addr4));
+ if (net_ratelimit())
+ printk(KERN_DEBUG "%s: dropped FromDS&ToDS "
+ "frame (RA=" MAC_FMT
+ " TA=" MAC_FMT " DA=" MAC_FMT
+ " SA=" MAC_FMT ")\n",
+ rx->dev->name,
+ MAC_ARG(hdr->addr1),
+ MAC_ARG(hdr->addr2),
+ MAC_ARG(hdr->addr3),
+ MAC_ARG(hdr->addr4));
return TXRX_DROP;
}
break;
@@ -1152,15 +1172,16 @@ ieee80211_rx_h_data(struct ieee80211_txr
/* send multicast frames both to higher layers in
* local net stack and back to the wireless media */
skb2 = skb_copy(skb, GFP_ATOMIC);
- if (!skb2)
+ if (!skb2 && net_ratelimit())
printk(KERN_DEBUG "%s: failed to clone "
"multicast frame\n", dev->name);
} else {
struct sta_info *dsta;
dsta = sta_info_get(local, skb->data);
if (dsta && !dsta->dev) {
- printk(KERN_DEBUG "Station with null dev "
- "structure!\n");
+ if (net_ratelimit())
+ printk(KERN_DEBUG "Station with null "
+ "dev structure!\n");
} else if (dsta && dsta->dev == dev) {
/* Destination station is associated to this
* AP, so send the frame directly to it and
@@ -1272,24 +1293,28 @@ static void ieee80211_rx_michael_mic_rep
/* TODO: verify that this is not triggered by fragmented
* frames (hw does not verify MIC for them). */
- printk(KERN_DEBUG "%s: TKIP hwaccel reported Michael MIC "
- "failure from " MAC_FMT " to " MAC_FMT " keyidx=%d\n",
- dev->name, MAC_ARG(hdr->addr2), MAC_ARG(hdr->addr1), keyidx);
+ if (net_ratelimit())
+ printk(KERN_DEBUG "%s: TKIP hwaccel reported Michael MIC "
+ "failure from " MAC_FMT " to " MAC_FMT " keyidx=%d\n",
+ dev->name, MAC_ARG(hdr->addr2), MAC_ARG(hdr->addr1),
+ keyidx);
if (!sta) {
/* Some hardware versions seem to generate incorrect
* Michael MIC reports; ignore them to avoid triggering
* countermeasures. */
- printk(KERN_DEBUG "%s: ignored spurious Michael MIC "
- "error for unknown address " MAC_FMT "\n",
- dev->name, MAC_ARG(hdr->addr2));
+ if (net_ratelimit())
+ printk(KERN_DEBUG "%s: ignored spurious Michael MIC "
+ "error for unknown address " MAC_FMT "\n",
+ dev->name, MAC_ARG(hdr->addr2));
goto ignore;
}
if (!(rx->fc & IEEE80211_FCTL_PROTECTED)) {
- printk(KERN_DEBUG "%s: ignored spurious Michael MIC "
- "error for a frame with no ISWEP flag (src "
- MAC_FMT ")\n", dev->name, MAC_ARG(hdr->addr2));
+ if (net_ratelimit())
+ printk(KERN_DEBUG "%s: ignored spurious Michael MIC "
+ "error for a frame with no ISWEP flag (src "
+ MAC_FMT ")\n", dev->name, MAC_ARG(hdr->addr2));
goto ignore;
}
@@ -1299,19 +1324,22 @@ static void ieee80211_rx_michael_mic_rep
* MIC errors for non-zero keyidx because these are reserved
* for group keys and only the AP is sending real multicast
* frames in BSS. */
- printk(KERN_DEBUG "%s: ignored Michael MIC error for "
- "a frame with non-zero keyidx (%d) (src " MAC_FMT
- ")\n", dev->name, keyidx, MAC_ARG(hdr->addr2));
+ if (net_ratelimit())
+ printk(KERN_DEBUG "%s: ignored Michael MIC error for "
+ "a frame with non-zero keyidx (%d) (src "
+ MAC_FMT ")\n", dev->name, keyidx,
+ MAC_ARG(hdr->addr2));
goto ignore;
}
if ((rx->fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA &&
((rx->fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_MGMT ||
(rx->fc & IEEE80211_FCTL_STYPE) != IEEE80211_STYPE_AUTH)) {
- printk(KERN_DEBUG "%s: ignored spurious Michael MIC "
- "error for a frame that cannot be encrypted "
- "(fc=0x%04x) (src " MAC_FMT ")\n",
- dev->name, rx->fc, MAC_ARG(hdr->addr2));
+ if (net_ratelimit())
+ printk(KERN_DEBUG "%s: ignored spurious Michael MIC "
+ "error for a frame that cannot be encrypted "
+ "(fc=0x%04x) (src " MAC_FMT ")\n",
+ dev->name, rx->fc, MAC_ARG(hdr->addr2));
goto ignore;
}
--
^ permalink raw reply [flat|nested] 43+ messages in thread* [PATCH 17/20] mac80211: avoid copying packets to interfaces that are down
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (15 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 16/20] mac80211: ratelimit some RX messages Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-16 4:48 ` Michael Wu
2007-08-15 14:49 ` [PATCH 18/20] mac80211, drivers: remove reset callback Johannes Berg
` (2 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
David Woodhouse noticed that under some circumstances the number of slab
allocations kept growing. After looking a bit, this seemed to happen
when you had a management mode interface that was *down*.
The reason for this is that when the device is down, all management
frames get queued to the in-kernel MLME (via ieee80211_sta_rx_mgmt) but
then the sta work is invoked but doesn't run when the netif is down.
When you then bring the interface up, all such frames are freed, but if
you change the mode all of them are lost because the skb queue is
reinitialised as soon as you go back to managed mode. The skb queue is
correctly cleared when the interface is brought down, but the code
doesn't account for the fact that it may be filled while it is not up.
This patch should fix the issue by simply ignoring all interfaces that
are down when going through the RX handlers.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
Is there a possibility of a race condition here? If the interface is
brought down right after this check the SKB could be copied to that
interface after the skb queue has been flushed.
net/mac80211/rx.c | 3 +++
1 file changed, 3 insertions(+)
--- wireless-dev.orig/net/mac80211/rx.c 2007-08-15 14:13:28.596516958 +0200
+++ wireless-dev/net/mac80211/rx.c 2007-08-15 14:13:30.866516958 +0200
@@ -1522,6 +1522,9 @@ void __ieee80211_rx(struct ieee80211_hw
list_for_each_entry(sdata, &local->sub_if_list, list) {
rx.u.rx.ra_match = 1;
+ if (!netif_running(sdata->dev))
+ continue;
+
prepres = prepare_for_handlers(sdata, bssid, &rx, hdr);
/* prepare_for_handlers can change sta */
sta = rx.sta;
--
^ permalink raw reply [flat|nested] 43+ messages in thread* Re: [PATCH 17/20] mac80211: avoid copying packets to interfaces that are down
2007-08-15 14:49 ` [PATCH 17/20] mac80211: avoid copying packets to interfaces that are down Johannes Berg
@ 2007-08-16 4:48 ` Michael Wu
2007-08-16 13:14 ` Johannes Berg
2007-08-21 8:50 ` [PATCH 17/20 v2] " Johannes Berg
0 siblings, 2 replies; 43+ messages in thread
From: Michael Wu @ 2007-08-16 4:48 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, Jiri Benc, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 429 bytes --]
On Wednesday 15 August 2007 07:49, Johannes Berg wrote:
> Is there a possibility of a race condition here? If the interface is
> brought down right after this check the SKB could be copied to that
> interface after the skb queue has been flushed.
>
Yeah. This can be avoided by holding a write lock on the subif lock while
flushing the skb queue. Not sure how much I like doing that, but it should
work.
-Michael Wu
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PATCH 17/20] mac80211: avoid copying packets to interfaces that are down
2007-08-16 4:48 ` Michael Wu
@ 2007-08-16 13:14 ` Johannes Berg
2007-08-21 8:50 ` [PATCH 17/20 v2] " Johannes Berg
1 sibling, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-16 13:14 UTC (permalink / raw)
To: Michael Wu; +Cc: John Linville, Jiri Benc, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 537 bytes --]
On Wed, 2007-08-15 at 21:48 -0700, Michael Wu wrote:
> On Wednesday 15 August 2007 07:49, Johannes Berg wrote:
> > Is there a possibility of a race condition here? If the interface is
> > brought down right after this check the SKB could be copied to that
> > interface after the skb queue has been flushed.
> >
> Yeah. This can be avoided by holding a write lock on the subif lock while
> flushing the skb queue. Not sure how much I like doing that, but it should
> work.
Hmm. Not entirely sure what you mean.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PATCH 17/20 v2] mac80211: avoid copying packets to interfaces that are down
2007-08-16 4:48 ` Michael Wu
2007-08-16 13:14 ` Johannes Berg
@ 2007-08-21 8:50 ` Johannes Berg
1 sibling, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-21 8:50 UTC (permalink / raw)
To: Michael Wu; +Cc: John Linville, Jiri Benc, linux-wireless, David Woodhouse
David Woodhouse noticed that under some circumstances the number of slab
allocations kept growing. After looking a bit, this seemed to happen
when you had a management mode interface that was *down*.
The reason for this is that when the device is down, all management
frames get queued to the in-kernel MLME (via ieee80211_sta_rx_mgmt) but
then the sta work is invoked but doesn't run when the netif is down.
When you then bring the interface up, all such frames are freed, but if
you change the mode all of them are lost because the skb queue is
reinitialised as soon as you go back to managed mode. The skb queue is
correctly cleared when the interface is brought down, but the code
doesn't account for the fact that it may be filled while it is not up.
This patch should fix the issue by simply ignoring all interfaces that
are down when going through the RX handlers.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/ieee80211.c | 9 +++++++++
net/mac80211/rx.c | 3 +++
2 files changed, 12 insertions(+)
--- wireless-dev.orig/net/mac80211/rx.c 2007-08-21 02:10:22.456915818 +0200
+++ wireless-dev/net/mac80211/rx.c 2007-08-21 10:45:58.276912218 +0200
@@ -1522,6 +1522,9 @@ void __ieee80211_rx(struct ieee80211_hw
list_for_each_entry(sdata, &local->sub_if_list, list) {
rx.u.rx.ra_match = 1;
+ if (!netif_running(sdata->dev))
+ continue;
+
prepres = prepare_for_handlers(sdata, bssid, &rx, hdr);
/* prepare_for_handlers can change sta */
sta = rx.sta;
--- wireless-dev.orig/net/mac80211/ieee80211.c 2007-08-21 10:36:42.236912218 +0200
+++ wireless-dev/net/mac80211/ieee80211.c 2007-08-21 10:48:05.176912218 +0200
@@ -466,7 +466,16 @@ static void ieee80211_if_shutdown(struct
sdata->u.sta.state = IEEE80211_DISABLED;
del_timer_sync(&sdata->u.sta.timer);
del_timer_sync(&sdata->u.sta.admit_timer);
+ /*
+ * Holding the sub_if_lock for writing here blocks
+ * out the receive path and makes sure it's not
+ * currently processing a packet that may get
+ * added to the queue.
+ */
+ write_lock_bh(&local->sub_if_lock);
skb_queue_purge(&sdata->u.sta.skb_queue);
+ write_unlock_bh(&local->sub_if_lock);
+
if (!local->ops->hw_scan &&
local->scan_dev == sdata->dev) {
local->sta_scanning = 0;
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PATCH 18/20] mac80211, drivers: remove reset callback
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (16 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 17/20] mac80211: avoid copying packets to interfaces that are down Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-15 15:00 ` Michael Buesch
2007-08-15 18:10 ` Ivo van Doorn
2007-08-15 14:49 ` [PATCH 19/20] mac80211: remove IEEE80211_HW_HOST_GEN_BEACON flag Johannes Berg
2007-08-15 14:49 ` [PATCH 20/20] mac80211: remove VLAN stuff Johannes Berg
19 siblings, 2 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
The callback isn't used so remove it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
drivers/net/wireless/adm8211.c | 38 --------------------------------------
drivers/net/wireless/b43/main.c | 18 ------------------
drivers/net/wireless/rt2400pci.c | 1 -
drivers/net/wireless/rt2500pci.c | 1 -
drivers/net/wireless/rt2500usb.c | 1 -
drivers/net/wireless/rt2x00mac.c | 1 -
drivers/net/wireless/rt61pci.c | 1 -
drivers/net/wireless/rt73usb.c | 1 -
include/net/mac80211.h | 3 ---
9 files changed, 65 deletions(-)
--- wireless-dev.orig/include/net/mac80211.h 2007-08-15 14:19:48.856516958 +0200
+++ wireless-dev/include/net/mac80211.h 2007-08-15 14:26:51.666516958 +0200
@@ -551,9 +551,6 @@ struct ieee80211_ops {
int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb,
struct ieee80211_tx_control *control);
- /* Handler for performing hardware reset. */
- int (*reset)(struct ieee80211_hw *hw);
-
/* Handler that is called when any netdevice attached to the hardware
* device is set UP for the first time. This can be used, e.g., to
* enable interrupts and beacon sending. */
--- wireless-dev.orig/drivers/net/wireless/adm8211.c 2007-08-15 14:04:47.026516958 +0200
+++ wireless-dev/drivers/net/wireless/adm8211.c 2007-08-15 14:26:51.696516958 +0200
@@ -1643,43 +1643,6 @@ static int adm8211_stop(struct ieee80211
return 0;
}
-static int adm8211_reset(struct ieee80211_hw *dev)
-{
- struct adm8211_priv *priv = dev->priv;
- int retval = 0;
-
- priv->nar = 0;
- ADM8211_CSR_WRITE(NAR, 0);
- ADM8211_CSR_WRITE(IER, 0);
- ADM8211_CSR_READ(NAR);
-
- adm8211_free_rings(dev);
-
- retval = adm8211_hw_reset(dev);
- if (retval) {
- printk(KERN_ERR "%s: hardware reset failed\n",
- wiphy_name(dev->wiphy));
- goto fail;
- }
-
- retval = adm8211_init_rings(dev);
- if (retval) {
- printk(KERN_ERR "%s: failed to initialize rings\n",
- wiphy_name(dev->wiphy));
- goto fail;
- }
-
- adm8211_hw_init(dev);
- adm8211_rf_set_channel(dev, priv->channel);
-
- ADM8211_CSR_WRITE(IER, ADM8211_INTMASK);
- adm8211_update_mode(dev);
- ADM8211_CSR_WRITE(RDR, 0);
-
-fail:
- return retval;
-}
-
static void adm8211_calc_durations(int *dur, int *plcp, size_t payload_len, int len,
int plcp_signal, int short_preamble)
{
@@ -1878,7 +1841,6 @@ static int adm8211_alloc_rings(struct ie
static const struct ieee80211_ops adm8211_ops = {
.tx = adm8211_tx,
- .reset = adm8211_reset,
.open = adm8211_open,
.stop = adm8211_stop,
.add_interface = adm8211_add_interface,
--- wireless-dev.orig/drivers/net/wireless/b43/main.c 2007-08-15 14:04:42.366516958 +0200
+++ wireless-dev/drivers/net/wireless/b43/main.c 2007-08-15 14:26:51.706516958 +0200
@@ -2536,23 +2536,6 @@ static int b43_get_stats(struct ieee8021
return 0;
}
-static int b43_dev_reset(struct ieee80211_hw *hw)
-{
- struct b43_wl *wl = hw_to_b43_wl(hw);
- struct b43_wldev *dev;
- int err = -ENODEV;
-
- mutex_lock(&wl->mutex);
- dev = wl->current_dev;
- if (dev) {
- b43_controller_restart(dev, "Reset by ieee80211 subsystem");
- err = 0;
- }
- mutex_unlock(&wl->mutex);
-
- return 0;
-}
-
static const char *phymode_to_string(unsigned int phymode)
{
switch (phymode) {
@@ -3485,7 +3468,6 @@ static const struct ieee80211_ops b43_hw
.conf_tx = b43_conf_tx,
.add_interface = b43_add_interface,
.remove_interface = b43_remove_interface,
- .reset = b43_dev_reset,
.config = b43_dev_config,
.config_interface = b43_config_interface,
.set_multicast_list = b43_set_multicast_list,
--- wireless-dev.orig/drivers/net/wireless/rt2400pci.c 2007-08-15 14:04:41.066516958 +0200
+++ wireless-dev/drivers/net/wireless/rt2400pci.c 2007-08-15 14:26:51.706516958 +0200
@@ -1589,7 +1589,6 @@ static int rt2400pci_tx_last_beacon(stru
static const struct ieee80211_ops rt2400pci_mac80211_ops = {
.tx = rt2x00mac_tx,
- .reset = rt2x00mac_reset,
.add_interface = rt2x00mac_add_interface,
.remove_interface = rt2x00mac_remove_interface,
.config = rt2x00mac_config,
--- wireless-dev.orig/drivers/net/wireless/rt2500pci.c 2007-08-15 14:04:41.126516958 +0200
+++ wireless-dev/drivers/net/wireless/rt2500pci.c 2007-08-15 14:26:51.706516958 +0200
@@ -1824,7 +1824,6 @@ static int rt2500pci_tx_last_beacon(stru
static const struct ieee80211_ops rt2500pci_mac80211_ops = {
.tx = rt2x00mac_tx,
- .reset = rt2x00mac_reset,
.add_interface = rt2x00mac_add_interface,
.remove_interface = rt2x00mac_remove_interface,
.config = rt2x00mac_config,
--- wireless-dev.orig/drivers/net/wireless/rt2500usb.c 2007-08-15 14:04:41.156516958 +0200
+++ wireless-dev/drivers/net/wireless/rt2500usb.c 2007-08-15 14:26:51.726516958 +0200
@@ -1512,7 +1512,6 @@ static int rt2500usb_probe_hw(struct rt2
*/
static const struct ieee80211_ops rt2500usb_mac80211_ops = {
.tx = rt2x00mac_tx,
- .reset = rt2x00mac_reset,
.add_interface = rt2x00mac_add_interface,
.remove_interface = rt2x00mac_remove_interface,
.config = rt2x00mac_config,
--- wireless-dev.orig/drivers/net/wireless/rt2x00mac.c 2007-08-15 14:04:41.176516958 +0200
+++ wireless-dev/drivers/net/wireless/rt2x00mac.c 2007-08-15 14:26:51.726516958 +0200
@@ -166,7 +166,6 @@ exit:
return retval;
}
-EXPORT_SYMBOL_GPL(rt2x00mac_reset);
int rt2x00mac_add_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf)
--- wireless-dev.orig/drivers/net/wireless/rt61pci.c 2007-08-15 14:04:41.246516958 +0200
+++ wireless-dev/drivers/net/wireless/rt61pci.c 2007-08-15 14:26:51.726516958 +0200
@@ -2340,7 +2340,6 @@ static void rt61pci_reset_tsf(struct iee
static const struct ieee80211_ops rt61pci_mac80211_ops = {
.tx = rt2x00mac_tx,
- .reset = rt2x00mac_reset,
.add_interface = rt2x00mac_add_interface,
.remove_interface = rt2x00mac_remove_interface,
.config = rt2x00mac_config,
--- wireless-dev.orig/drivers/net/wireless/rt73usb.c 2007-08-15 14:04:41.296516958 +0200
+++ wireless-dev/drivers/net/wireless/rt73usb.c 2007-08-15 14:26:51.736516958 +0200
@@ -1813,7 +1813,6 @@ static void rt73usb_reset_tsf(struct iee
static const struct ieee80211_ops rt73usb_mac80211_ops = {
.tx = rt2x00mac_tx,
- .reset = rt2x00mac_reset,
.add_interface = rt2x00mac_add_interface,
.remove_interface = rt2x00mac_remove_interface,
.config = rt2x00mac_config,
--
^ permalink raw reply [flat|nested] 43+ messages in thread* Re: [PATCH 18/20] mac80211, drivers: remove reset callback
2007-08-15 14:49 ` [PATCH 18/20] mac80211, drivers: remove reset callback Johannes Berg
@ 2007-08-15 15:00 ` Michael Buesch
2007-08-15 18:10 ` Ivo van Doorn
1 sibling, 0 replies; 43+ messages in thread
From: Michael Buesch @ 2007-08-15 15:00 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
On Wednesday 15 August 2007 16:49:38 Johannes Berg wrote:
> -static int b43_dev_reset(struct ieee80211_hw *hw)
> -{
> - struct b43_wl *wl = hw_to_b43_wl(hw);
> - struct b43_wldev *dev;
> - int err = -ENODEV;
> -
> - mutex_lock(&wl->mutex);
> - dev = wl->current_dev;
> - if (dev) {
> - b43_controller_restart(dev, "Reset by ieee80211 subsystem");
> - err = 0;
> - }
> - mutex_unlock(&wl->mutex);
> -
> - return 0;
> -}
Ack. This also fixes the bug here, that was on my todo list ;)
--
Greetings Michael.
^ permalink raw reply [flat|nested] 43+ messages in thread* Re: [PATCH 18/20] mac80211, drivers: remove reset callback
2007-08-15 14:49 ` [PATCH 18/20] mac80211, drivers: remove reset callback Johannes Berg
2007-08-15 15:00 ` Michael Buesch
@ 2007-08-15 18:10 ` Ivo van Doorn
2007-08-16 13:14 ` Johannes Berg
1 sibling, 1 reply; 43+ messages in thread
From: Ivo van Doorn @ 2007-08-15 18:10 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
On Wednesday 15 August 2007, Johannes Berg wrote:
> The callback isn't used so remove it.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
ACK for the rt2x00 part.
If reset is permenantly gone, I'll probably move the reset handler
to rt2x00dev.c soon since that is the only place where it is used
at this time.
Ivo
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PATCH 18/20] mac80211, drivers: remove reset callback
2007-08-15 18:10 ` Ivo van Doorn
@ 2007-08-16 13:14 ` Johannes Berg
0 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-16 13:14 UTC (permalink / raw)
To: Ivo van Doorn; +Cc: John Linville, Jiri Benc, Michael Wu, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
On Wed, 2007-08-15 at 20:10 +0200, Ivo van Doorn wrote:
> ACK for the rt2x00 part.
> If reset is permenantly gone, I'll probably move the reset handler
> to rt2x00dev.c soon since that is the only place where it is used
> at this time.
I noticed, but wasn't sure what you planned so refrained from further
changes (also to make the diff smaller etc.)
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PATCH 19/20] mac80211: remove IEEE80211_HW_HOST_GEN_BEACON flag
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (17 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 18/20] mac80211, drivers: remove reset callback Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-15 14:49 ` [PATCH 20/20] mac80211: remove VLAN stuff Johannes Berg
19 siblings, 0 replies; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
There's no point in setting that flag, drivers simply call
ieee80211_beacon_get() if they need it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
drivers/net/wireless/rt2400pci.c | 1 -
drivers/net/wireless/rt2500pci.c | 1 -
drivers/net/wireless/rt61pci.c | 1 -
include/net/mac80211.h | 13 ++++++-------
4 files changed, 6 insertions(+), 10 deletions(-)
--- wireless-dev.orig/include/net/mac80211.h 2007-08-15 14:27:26.006516958 +0200
+++ wireless-dev/include/net/mac80211.h 2007-08-15 14:27:27.166516958 +0200
@@ -445,14 +445,13 @@ struct ieee80211_hw {
/* TODO: frame_type 802.11/802.3, sw_encryption requirements */
- /* Some wireless LAN chipsets generate beacons in the hardware/firmware
- * and others rely on host generated beacons. This option is used to
- * configure the upper layer IEEE 802.11 module to generate beacons.
- * The low-level driver can use ieee80211_beacon_get() to fetch the
- * next beacon frame. */
-#define IEEE80211_HW_HOST_GEN_BEACON (1<<0)
+/* hole at 0 */
- /* The device needs to be supplied with a beacon template only. */
+ /*
+ * The device only needs to be supplied with a beacon template.
+ * If you need the host to generate each beacon then don't use
+ * this flag and use ieee80211_beacon_get().
+ */
#define IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE (1<<1)
/* Some devices handle decryption internally and do not
--- wireless-dev.orig/drivers/net/wireless/rt2400pci.c 2007-08-15 14:27:26.016516958 +0200
+++ wireless-dev/drivers/net/wireless/rt2400pci.c 2007-08-15 14:27:27.176516958 +0200
@@ -1444,7 +1444,6 @@ static void rt2400pci_probe_hw_mode(stru
* Initialize all hw fields.
*/
rt2x00dev->hw->flags =
- IEEE80211_HW_HOST_GEN_BEACON |
IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
IEEE80211_HW_WEP_INCLUDE_IV |
IEEE80211_HW_DATA_NULLFUNC_ACK |
--- wireless-dev.orig/drivers/net/wireless/rt2500pci.c 2007-08-15 14:27:26.016516958 +0200
+++ wireless-dev/drivers/net/wireless/rt2500pci.c 2007-08-15 14:27:27.176516958 +0200
@@ -1689,7 +1689,6 @@ static void rt2500pci_probe_hw_mode(stru
* Initialize all hw fields.
*/
rt2x00dev->hw->flags =
- IEEE80211_HW_HOST_GEN_BEACON |
IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
IEEE80211_HW_WEP_INCLUDE_IV |
IEEE80211_HW_DATA_NULLFUNC_ACK |
--- wireless-dev.orig/drivers/net/wireless/rt61pci.c 2007-08-15 14:27:26.066516958 +0200
+++ wireless-dev/drivers/net/wireless/rt61pci.c 2007-08-15 14:27:27.176516958 +0200
@@ -2213,7 +2213,6 @@ static void rt61pci_probe_hw_mode(struct
* Initialize all hw fields.
*/
rt2x00dev->hw->flags =
- IEEE80211_HW_HOST_GEN_BEACON |
IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
IEEE80211_HW_WEP_INCLUDE_IV |
IEEE80211_HW_DATA_NULLFUNC_ACK |
--
^ permalink raw reply [flat|nested] 43+ messages in thread* [PATCH 20/20] mac80211: remove VLAN stuff
2007-08-15 14:49 [PATCH 00/20] reorganised patches Johannes Berg
` (18 preceding siblings ...)
2007-08-15 14:49 ` [PATCH 19/20] mac80211: remove IEEE80211_HW_HOST_GEN_BEACON flag Johannes Berg
@ 2007-08-15 14:49 ` Johannes Berg
2007-08-16 15:03 ` Johannes Berg
19 siblings, 1 reply; 43+ messages in thread
From: Johannes Berg @ 2007-08-15 14:49 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, Michael Wu, linux-wireless
This patch removes all VLAN stuff from mac80211.
At the moment, it cannot possibly work, mac80211 doesn't actually do
anything with those VLAN type interfaces. Also, there doesn't seem to be
any point in doing it in the wireless stack. The recently added
"macvlan" shows how you can do VLANs based on destination address, what
we will need is something like "smacvlan" that does VLANs based on
source address.
Hence, let's remove this, and when somebody needs it they get to add it
properly.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
include/net/mac80211.h | 2 -
net/mac80211/debugfs_netdev.c | 27 --------------------
net/mac80211/debugfs_sta.c | 1
net/mac80211/hostapd_ioctl.h | 9 +-----
net/mac80211/ieee80211.c | 7 -----
net/mac80211/ieee80211_i.h | 12 ---------
net/mac80211/ieee80211_iface.c | 2 -
net/mac80211/ieee80211_ioctl.c | 54 -----------------------------------------
net/mac80211/rx.c | 12 +++------
net/mac80211/sta_info.h | 2 -
net/mac80211/tx.c | 5 +--
11 files changed, 11 insertions(+), 122 deletions(-)
--- wireless-dev.orig/net/mac80211/ieee80211.c 2007-08-15 14:27:22.436516958 +0200
+++ wireless-dev/net/mac80211/ieee80211.c 2007-08-15 14:27:31.036516958 +0200
@@ -308,12 +308,7 @@ static inline int identical_mac_addr_all
type2 == IEEE80211_IF_TYPE_WDS) ||
(type1 == IEEE80211_IF_TYPE_WDS &&
(type2 == IEEE80211_IF_TYPE_WDS ||
- type2 == IEEE80211_IF_TYPE_AP)) ||
- (type1 == IEEE80211_IF_TYPE_AP &&
- type2 == IEEE80211_IF_TYPE_VLAN) ||
- (type1 == IEEE80211_IF_TYPE_VLAN &&
- (type2 == IEEE80211_IF_TYPE_AP ||
- type2 == IEEE80211_IF_TYPE_VLAN)));
+ type2 == IEEE80211_IF_TYPE_AP)));
}
/* Check if running monitor interfaces should go to a "soft monitor" mode
--- wireless-dev.orig/include/net/mac80211.h 2007-08-15 14:27:27.166516958 +0200
+++ wireless-dev/include/net/mac80211.h 2007-08-15 14:27:31.036516958 +0200
@@ -310,7 +310,6 @@ struct ieee80211_conf {
* @IEEE80211_IF_TYPE_IBSS: interface in IBSS (ad-hoc) mode.
* @IEEE80211_IF_TYPE_MNTR: interface in monitor (rfmon) mode.
* @IEEE80211_IF_TYPE_WDS: interface in WDS mode.
- * @IEEE80211_IF_TYPE_VLAN: not used.
*/
enum ieee80211_if_types {
IEEE80211_IF_TYPE_AP = 0x00000000,
@@ -319,7 +318,6 @@ enum ieee80211_if_types {
IEEE80211_IF_TYPE_IBSS = 0x00000003,
IEEE80211_IF_TYPE_MNTR = 0x00000004,
IEEE80211_IF_TYPE_WDS = 0x5A580211,
- IEEE80211_IF_TYPE_VLAN = 0x00080211,
};
/**
--- wireless-dev.orig/net/mac80211/debugfs_netdev.c 2007-08-15 14:27:22.506516958 +0200
+++ wireless-dev/net/mac80211/debugfs_netdev.c 2007-08-15 14:27:31.036516958 +0200
@@ -422,9 +422,6 @@ __IEEE80211_IF_FILE(beacon_tail_len);
/* WDS attributes */
IEEE80211_IF_FILE(peer, u.wds.remote_addr, MAC);
-/* VLAN attributes */
-IEEE80211_IF_FILE(vlan_id, u.vlan.id, DEC);
-
/* MONITOR attributes */
static ssize_t ieee80211_if_fmt_mode(
const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
@@ -531,15 +528,6 @@ static void add_wds_files(struct ieee802
DEBUGFS_ADD(peer, wds);
}
-static void add_vlan_files(struct ieee80211_sub_if_data *sdata)
-{
- DEBUGFS_ADD(channel_use, vlan);
- DEBUGFS_ADD(drop_unencrypted, vlan);
- DEBUGFS_ADD(eapol, vlan);
- DEBUGFS_ADD(ieee8021_x, vlan);
- DEBUGFS_ADD(vlan_id, vlan);
-}
-
static void add_monitor_files(struct ieee80211_sub_if_data *sdata)
{
DEBUGFS_ADD(mode, monitor);
@@ -564,9 +552,6 @@ static void add_files(struct ieee80211_s
case IEEE80211_IF_TYPE_MNTR:
add_monitor_files(sdata);
break;
- case IEEE80211_IF_TYPE_VLAN:
- add_vlan_files(sdata);
- break;
default:
break;
}
@@ -660,15 +645,6 @@ static void del_wds_files(struct ieee802
DEBUGFS_DEL(peer, wds);
}
-static void del_vlan_files(struct ieee80211_sub_if_data *sdata)
-{
- DEBUGFS_DEL(channel_use, vlan);
- DEBUGFS_DEL(drop_unencrypted, vlan);
- DEBUGFS_DEL(eapol, vlan);
- DEBUGFS_DEL(ieee8021_x, vlan);
- DEBUGFS_DEL(vlan_id, vlan);
-}
-
static void del_monitor_files(struct ieee80211_sub_if_data *sdata)
{
DEBUGFS_DEL(mode, monitor);
@@ -693,9 +669,6 @@ static void del_files(struct ieee80211_s
case IEEE80211_IF_TYPE_MNTR:
del_monitor_files(sdata);
break;
- case IEEE80211_IF_TYPE_VLAN:
- del_vlan_files(sdata);
- break;
default:
break;
}
--- wireless-dev.orig/net/mac80211/hostapd_ioctl.h 2007-08-15 14:27:22.596516958 +0200
+++ wireless-dev/net/mac80211/hostapd_ioctl.h 2007-08-15 14:27:31.036516958 +0200
@@ -61,7 +61,6 @@ enum {
PRISM2_HOSTAPD_SET_RATE_SETS = 1005,
PRISM2_HOSTAPD_ADD_IF = 1006,
PRISM2_HOSTAPD_REMOVE_IF = 1007,
- PRISM2_HOSTAPD_SET_STA_VLAN = 1010,
PRISM2_HOSTAPD_SET_CHANNEL_FLAG = 1012,
PRISM2_HOSTAPD_SET_REGULATORY_DOMAIN = 1013,
PRISM2_HOSTAPD_SET_TX_QUEUE_PARAMS = 1014,
@@ -135,15 +134,11 @@ struct prism2_hostapd_param {
* num_basic_rates * u16 */
} set_rate_sets;
struct {
- u8 type; /* WDS, VLAN, etc */
+ u8 type; /* WDS, etc */
u8 name[IFNAMSIZ];
u8 data[0] ALIGNED;
} if_info;
struct {
- char vlan_name[IFNAMSIZ];
- int vlan_id;
- } set_sta_vlan;
- struct {
u16 mode; /* MODE_* */
u16 chan;
u32 flag;
@@ -201,7 +196,7 @@ struct ieee80211_rate_data {
/* ADD_IF and REMOVE_IF 'type' argument */
enum {
- HOSTAP_IF_WDS = 1, HOSTAP_IF_VLAN = 2, HOSTAP_IF_BSS = 3,
+ HOSTAP_IF_WDS = 1, HOSTAP_IF_BSS = 3,
HOSTAP_IF_STA = 4
};
--- wireless-dev.orig/net/mac80211/ieee80211_i.h 2007-08-15 14:27:22.606516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_i.h 2007-08-15 14:27:31.036516958 +0200
@@ -233,10 +233,6 @@ struct ieee80211_if_wds {
struct sta_info *sta;
};
-struct ieee80211_if_vlan {
- u8 id;
-};
-
struct ieee80211_if_sta {
enum {
IEEE80211_DISABLED, IEEE80211_AUTHENTICATE,
@@ -348,7 +344,6 @@ struct ieee80211_sub_if_data {
union {
struct ieee80211_if_ap ap;
struct ieee80211_if_wds wds;
- struct ieee80211_if_vlan vlan;
struct ieee80211_if_sta sta;
} u;
int channel_use;
@@ -433,13 +428,6 @@ struct ieee80211_sub_if_data {
struct dentry *peer;
} wds;
struct {
- struct dentry *channel_use;
- struct dentry *drop_unencrypted;
- struct dentry *eapol;
- struct dentry *ieee8021_x;
- struct dentry *vlan_id;
- } vlan;
- struct {
struct dentry *mode;
} monitor;
struct dentry *default_key;
--- wireless-dev.orig/net/mac80211/ieee80211_iface.c 2007-08-15 14:27:22.666516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_iface.c 2007-08-15 14:27:31.036516958 +0200
@@ -165,8 +165,6 @@ void ieee80211_if_set_type(struct net_de
case IEEE80211_IF_TYPE_WDS:
sdata->bss = NULL;
break;
- case IEEE80211_IF_TYPE_VLAN:
- break;
case IEEE80211_IF_TYPE_AP:
sdata->u.ap.dtim_period = 2;
sdata->u.ap.force_unicast_rateidx = -1;
--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:27:22.706516958 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c 2007-08-15 14:27:31.046516958 +0200
@@ -292,8 +292,7 @@ static int ieee80211_ioctl_add_sta(struc
sta_info_put(sta);
- if (sdata->type == IEEE80211_IF_TYPE_AP ||
- sdata->type == IEEE80211_IF_TYPE_VLAN)
+ if (sdata->type == IEEE80211_IF_TYPE_AP)
ieee80211_send_layer2_update(dev, param->sta_addr);
return 0;
@@ -905,13 +904,6 @@ static int ieee80211_ioctl_add_if(struct
__ieee80211_if_del(local, sdata);
}
return res;
- case HOSTAP_IF_VLAN:
- if (left < sizeof(struct hostapd_if_vlan))
- return -EPROTO;
-
- res = ieee80211_if_add(dev, param->u.if_info.name, NULL,
- IEEE80211_IF_TYPE_VLAN);
- return res;
case HOSTAP_IF_BSS:
bss = (struct hostapd_if_bss *) param->u.if_info.data;
@@ -947,9 +939,6 @@ static int ieee80211_ioctl_remove_if(str
case HOSTAP_IF_WDS:
type = IEEE80211_IF_TYPE_WDS;
break;
- case HOSTAP_IF_VLAN:
- type = IEEE80211_IF_TYPE_VLAN;
- break;
case HOSTAP_IF_BSS:
type = IEEE80211_IF_TYPE_AP;
break;
@@ -964,38 +953,6 @@ static int ieee80211_ioctl_remove_if(str
}
-static int ieee80211_ioctl_set_sta_vlan(struct net_device *dev,
- struct prism2_hostapd_param *param)
-{
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
- struct sta_info *sta;
-
- sta = sta_info_get(local, param->sta_addr);
- if (sta) {
- struct net_device *new_vlan_dev;
- new_vlan_dev =
- dev_get_by_name(param->u.set_sta_vlan.vlan_name);
- if (new_vlan_dev) {
-#if 0
- printk("%s: Station " MAC_FMT " moved to vlan: %s\n",
- dev->name, MAC_ARG(param->sta_addr),
- new_vlan_dev->name);
-#endif
- if (sta->dev != new_vlan_dev) {
- ieee80211_send_layer2_update(new_vlan_dev,
- sta->addr);
- }
- sta->dev = new_vlan_dev;
- sta->vlan_id = param->u.set_sta_vlan.vlan_id;
- dev_put(new_vlan_dev);
- }
- sta_info_put(sta);
- }
-
- return sta ? 0 : -ENOENT;
-}
-
-
static int ieee80211_set_gen_ie(struct net_device *dev, u8 *ie, size_t len)
{
struct ieee80211_sub_if_data *sdata;
@@ -1157,9 +1114,6 @@ static int ieee80211_ioctl_priv_hostapd(
case PRISM2_HOSTAPD_REMOVE_IF:
ret = ieee80211_ioctl_remove_if(dev, param);
break;
- case PRISM2_HOSTAPD_SET_STA_VLAN:
- ret = ieee80211_ioctl_set_sta_vlan(dev, param);
- break;
case PRISM2_HOSTAPD_SET_CHANNEL_FLAG:
ret = ieee80211_ioctl_set_channel_flag(dev, param);
break;
@@ -1291,9 +1245,6 @@ static int ieee80211_ioctl_siwmode(struc
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
int type;
- if (sdata->type == IEEE80211_IF_TYPE_VLAN)
- return -EOPNOTSUPP;
-
switch (*mode) {
case IW_MODE_MASTER:
type = IEEE80211_IF_TYPE_AP;
@@ -1349,9 +1300,6 @@ static int ieee80211_ioctl_giwmode(struc
case IEEE80211_IF_TYPE_WDS:
*mode = IW_MODE_REPEAT;
break;
- case IEEE80211_IF_TYPE_VLAN:
- *mode = IW_MODE_SECOND; /* FIXME */
- break;
default:
*mode = IW_MODE_AUTO;
break;
--- wireless-dev.orig/net/mac80211/tx.c 2007-08-15 14:27:22.776516958 +0200
+++ wireless-dev/net/mac80211/tx.c 2007-08-15 14:27:31.046516958 +0200
@@ -1319,7 +1319,7 @@ fail:
/**
* ieee80211_subif_start_xmit - netif start_xmit function for Ethernet-type
- * subinterfaces (wlan#, WDS, and VLAN interfaces)
+ * subinterfaces
* @skb: packet to be sent
* @dev: incoming interface
*
@@ -1363,8 +1363,7 @@ int ieee80211_subif_start_xmit(struct sk
/* TODO: handling for 802.1x authorized/unauthorized port */
fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA;
- if (likely(sdata->type == IEEE80211_IF_TYPE_AP ||
- sdata->type == IEEE80211_IF_TYPE_VLAN)) {
+ if (likely(sdata->type == IEEE80211_IF_TYPE_AP)) {
fc |= IEEE80211_FCTL_FROMDS;
/* DA BSSID SA */
memcpy(hdr.addr1, skb->data, ETH_ALEN);
--- wireless-dev.orig/net/mac80211/debugfs_sta.c 2007-08-15 14:27:22.836516958 +0200
+++ wireless-dev/net/mac80211/debugfs_sta.c 2007-08-15 14:27:31.046516958 +0200
@@ -62,7 +62,6 @@ static const struct file_operations sta_
STA_FILE(aid, aid, D);
STA_FILE(key_idx_compression, key_idx_compression, D);
STA_FILE(dev, dev->name, S);
-STA_FILE(vlan_id, vlan_id, D);
STA_FILE(rx_packets, rx_packets, LU);
STA_FILE(tx_packets, tx_packets, LU);
STA_FILE(rx_bytes, rx_bytes, LU);
--- wireless-dev.orig/net/mac80211/sta_info.h 2007-08-15 14:27:22.876516958 +0200
+++ wireless-dev/net/mac80211/sta_info.h 2007-08-15 14:27:31.046516958 +0200
@@ -113,8 +113,6 @@ struct sta_info {
unsigned int wme_tx_queue[NUM_RX_DATA_QUEUES];
#endif /* CONFIG_MAC80211_DEBUG_COUNTERS */
- int vlan_id;
-
u16 listen_interval;
#ifdef CONFIG_MAC80211_DEBUGFS
--- wireless-dev.orig/net/mac80211/rx.c 2007-08-15 14:27:22.946516958 +0200
+++ wireless-dev/net/mac80211/rx.c 2007-08-15 14:27:31.046516958 +0200
@@ -970,9 +970,8 @@ ieee80211_rx_h_data_agg(struct ieee80211
sdata->stats.rx_bytes += frame->len;
if (local->bridge_packets &&
- (sdata->type == IEEE80211_IF_TYPE_AP ||
- sdata->type == IEEE80211_IF_TYPE_VLAN) &&
- rx->u.rx.ra_match) {
+ sdata->type == IEEE80211_IF_TYPE_AP &&
+ rx->u.rx.ra_match) {
if (is_multicast_ether_addr(frame->data)) {
/* send multicast frames both to higher layers
* in local net stack and back to the wireless
@@ -1068,8 +1067,7 @@ ieee80211_rx_h_data(struct ieee80211_txr
memcpy(dst, hdr->addr3, ETH_ALEN);
memcpy(src, hdr->addr2, ETH_ALEN);
- if (unlikely(sdata->type != IEEE80211_IF_TYPE_AP &&
- sdata->type != IEEE80211_IF_TYPE_VLAN)) {
+ if (unlikely(sdata->type != IEEE80211_IF_TYPE_AP)) {
if (net_ratelimit())
printk(KERN_DEBUG "%s: dropped ToDS frame "
"(BSSID=" MAC_FMT
@@ -1166,8 +1164,8 @@ ieee80211_rx_h_data(struct ieee80211_txr
sdata->stats.rx_packets++;
sdata->stats.rx_bytes += skb->len;
- if (local->bridge_packets && (sdata->type == IEEE80211_IF_TYPE_AP
- || sdata->type == IEEE80211_IF_TYPE_VLAN) && rx->u.rx.ra_match) {
+ if (local->bridge_packets && sdata->type == IEEE80211_IF_TYPE_AP
+ && rx->u.rx.ra_match) {
if (is_multicast_ether_addr(skb->data)) {
/* send multicast frames both to higher layers in
* local net stack and back to the wireless media */
--
^ permalink raw reply [flat|nested] 43+ messages in thread