aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Hochreutiner <olivier.hochreutiner@epfl.ch>2006-03-07 14:13:55 -0500
committerJohn W. Linville <linville@tuxdriver.com>2006-03-17 15:08:04 -0500
commit651be26f2daf31e61faf4b55ada709cf39ec76a2 (patch)
treecac9bac812d1ecc1f85bce54a2591cab34752627
parent71de1f3dd14e3e39cef929506a9526779f5a447d (diff)
[PATCH] ipw2200: wireless extension sensitivity threshold support
The patch allows the user to set the handover threshold, i.e. the number of consecutively missed beacons that will trigger a roaming attempt. The disassociation threshold is set to 3 times the handover threshold. Signed-off-by: Olivier Hochreutiner <olivier.hochreutiner@epfl.ch> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--Documentation/networking/README.ipw220010
-rw-r--r--drivers/net/wireless/ipw2200.c48
-rw-r--r--drivers/net/wireless/ipw2200.h4
3 files changed, 61 insertions, 1 deletions
diff --git a/Documentation/networking/README.ipw2200 b/Documentation/networking/README.ipw2200
index 712c5681338b..c2f693e24c7d 100644
--- a/Documentation/networking/README.ipw2200
+++ b/Documentation/networking/README.ipw2200
@@ -30,6 +30,7 @@ Index
302. Ad-Hoc Networking 302. Ad-Hoc Networking
313. Interacting with Wireless Tools 313. Interacting with Wireless Tools
323.1. iwconfig mode 323.1. iwconfig mode
333.2. iwconfig sens
334. About the Version Numbers 344. About the Version Numbers
345. Firmware installation 355. Firmware installation
356. Support 366. Support
@@ -383,6 +384,15 @@ When configuring the mode of the adapter, all run-time configured parameters
383are reset to the value used when the module was loaded. This includes 384are reset to the value used when the module was loaded. This includes
384channels, rates, ESSID, etc. 385channels, rates, ESSID, etc.
385 386
3873.2 iwconfig sens
388-----------------------------------------------
389
390The 'iwconfig ethX sens XX' command will not set the signal sensitivity
391threshold, as described in iwconfig documentation, but rather the number
392of consecutive missed beacons that will trigger handover, i.e. roaming
393to another access point. At the same time, it will set the disassociation
394threshold to 3 times the given value.
395
386 396
3874. About the Version Numbers 3974. About the Version Numbers
388----------------------------------------------- 398-----------------------------------------------
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 954a095eeb51..078f33b01c2f 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -8608,6 +8608,52 @@ static int ipw_wx_get_nick(struct net_device *dev,
8608 return 0; 8608 return 0;
8609} 8609}
8610 8610
8611static int ipw_wx_set_sens(struct net_device *dev,
8612 struct iw_request_info *info,
8613 union iwreq_data *wrqu, char *extra)
8614{
8615 struct ipw_priv *priv = ieee80211_priv(dev);
8616 int err = 0;
8617
8618 IPW_DEBUG_WX("Setting roaming threshold to %d\n", wrqu->sens.value);
8619 IPW_DEBUG_WX("Setting disassociate threshold to %d\n", 3*wrqu->sens.value);
8620 mutex_lock(&priv->mutex);
8621
8622 if (wrqu->sens.fixed == 0)
8623 {
8624 priv->roaming_threshold = IPW_MB_ROAMING_THRESHOLD_DEFAULT;
8625 priv->disassociate_threshold = IPW_MB_DISASSOCIATE_THRESHOLD_DEFAULT;
8626 goto out;
8627 }
8628 if ((wrqu->sens.value > IPW_MB_ROAMING_THRESHOLD_MAX) ||
8629 (wrqu->sens.value < IPW_MB_ROAMING_THRESHOLD_MIN)) {
8630 err = -EINVAL;
8631 goto out;
8632 }
8633
8634 priv->roaming_threshold = wrqu->sens.value;
8635 priv->disassociate_threshold = 3*wrqu->sens.value;
8636 out:
8637 mutex_unlock(&priv->mutex);
8638 return err;
8639}
8640
8641static int ipw_wx_get_sens(struct net_device *dev,
8642 struct iw_request_info *info,
8643 union iwreq_data *wrqu, char *extra)
8644{
8645 struct ipw_priv *priv = ieee80211_priv(dev);
8646 mutex_lock(&priv->mutex);
8647 wrqu->sens.fixed = 1;
8648 wrqu->sens.value = priv->roaming_threshold;
8649 mutex_unlock(&priv->mutex);
8650
8651 IPW_DEBUG_WX("GET roaming threshold -> %s %d \n",
8652 wrqu->power.disabled ? "OFF" : "ON", wrqu->power.value);
8653
8654 return 0;
8655}
8656
8611static int ipw_wx_set_rate(struct net_device *dev, 8657static int ipw_wx_set_rate(struct net_device *dev,
8612 struct iw_request_info *info, 8658 struct iw_request_info *info,
8613 union iwreq_data *wrqu, char *extra) 8659 union iwreq_data *wrqu, char *extra)
@@ -9429,6 +9475,8 @@ static iw_handler ipw_wx_handlers[] = {
9429 IW_IOCTL(SIOCGIWFREQ) = ipw_wx_get_freq, 9475 IW_IOCTL(SIOCGIWFREQ) = ipw_wx_get_freq,
9430 IW_IOCTL(SIOCSIWMODE) = ipw_wx_set_mode, 9476 IW_IOCTL(SIOCSIWMODE) = ipw_wx_set_mode,
9431 IW_IOCTL(SIOCGIWMODE) = ipw_wx_get_mode, 9477 IW_IOCTL(SIOCGIWMODE) = ipw_wx_get_mode,
9478 IW_IOCTL(SIOCSIWSENS) = ipw_wx_set_sens,
9479 IW_IOCTL(SIOCGIWSENS) = ipw_wx_get_sens,
9432 IW_IOCTL(SIOCGIWRANGE) = ipw_wx_get_range, 9480 IW_IOCTL(SIOCGIWRANGE) = ipw_wx_get_range,
9433 IW_IOCTL(SIOCSIWAP) = ipw_wx_set_wap, 9481 IW_IOCTL(SIOCSIWAP) = ipw_wx_set_wap,
9434 IW_IOCTL(SIOCGIWAP) = ipw_wx_get_wap, 9482 IW_IOCTL(SIOCGIWAP) = ipw_wx_get_wap,
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h
index e8f133666c65..2033fc6f1892 100644
--- a/drivers/net/wireless/ipw2200.h
+++ b/drivers/net/wireless/ipw2200.h
@@ -246,8 +246,10 @@ enum connection_manager_assoc_states {
246#define HOST_NOTIFICATION_S36_MEASUREMENT_REFUSED 31 246#define HOST_NOTIFICATION_S36_MEASUREMENT_REFUSED 31
247 247
248#define HOST_NOTIFICATION_STATUS_BEACON_MISSING 1 248#define HOST_NOTIFICATION_STATUS_BEACON_MISSING 1
249#define IPW_MB_DISASSOCIATE_THRESHOLD_DEFAULT 24 249#define IPW_MB_ROAMING_THRESHOLD_MIN 1
250#define IPW_MB_ROAMING_THRESHOLD_DEFAULT 8 250#define IPW_MB_ROAMING_THRESHOLD_DEFAULT 8
251#define IPW_MB_ROAMING_THRESHOLD_MAX 30
252#define IPW_MB_DISASSOCIATE_THRESHOLD_DEFAULT 3*IPW_MB_ROAMING_THRESHOLD_DEFAULT
251#define IPW_REAL_RATE_RX_PACKET_THRESHOLD 300 253#define IPW_REAL_RATE_RX_PACKET_THRESHOLD 300
252 254
253#define MACADRR_BYTE_LEN 6 255#define MACADRR_BYTE_LEN 6