aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2003-05-29 04:32:27 (GMT)
committerJouni Malinen <j@w1.fi>2003-05-29 04:32:27 (GMT)
commitc83ea97d60df3ea15425f37c3ea53f3c73472cea (patch)
tree8a34d10feb32c3ffd3ae4fc047717566bac29d8a
parente69db17c6927bd56a01148e2c44785c860be2d4e (diff)
downloadhostap-history-c83ea97d60df3ea15425f37c3ea53f3c73472cea.zip
hostap-history-c83ea97d60df3ea15425f37c3ea53f3c73472cea.tar.gz
hostap-history-c83ea97d60df3ea15425f37c3ea53f3c73472cea.tar.bz2
Update basic rate set automatically, when changing supported rate set to
not include all previous basic rates.
-rw-r--r--driver/modules/hostap_ioctl.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/driver/modules/hostap_ioctl.c b/driver/modules/hostap_ioctl.c
index 45aa715..2be30b6 100644
--- a/driver/modules/hostap_ioctl.c
+++ b/driver/modules/hostap_ioctl.c
@@ -350,7 +350,22 @@ static int prism2_ioctl_giwspy(struct net_device *dev,
static int hostap_set_rate(struct net_device *dev)
{
local_info_t *local = (local_info_t *) dev->priv;
- int ret;
+ int ret, basic_rates;
+
+ basic_rates = local->basic_rates & local->tx_rate_control;
+ if (!basic_rates || basic_rates != local->basic_rates) {
+ printk(KERN_INFO "%s: updating basic rate set automatically "
+ "to match with the new supported rate set\n",
+ dev->name);
+ if (!basic_rates)
+ basic_rates = local->tx_rate_control;
+
+ local->basic_rates = basic_rates;
+ if (hostap_set_word(dev, HFA384X_RID_CNFBASICRATES,
+ basic_rates))
+ printk(KERN_WARNING "%s: failed to set "
+ "cnfBasicRates\n", dev->name);
+ }
ret = (hostap_set_word(dev, HFA384X_RID_TXRATECONTROL,
local->tx_rate_control) ||