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 <[email protected]>
---
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;
}
--
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
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
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
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