aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2003-05-29 04:37:22 (GMT)
committerJouni Malinen <j@w1.fi>2003-05-29 04:37:22 (GMT)
commit49b9ac533e845e1407f73111bf413b3ec796b204 (patch)
treef251c4fee10b33f7f2e0df71b959388c4c2fb317
parentc83ea97d60df3ea15425f37c3ea53f3c73472cea (diff)
downloadhostap-history-49b9ac533e845e1407f73111bf413b3ec796b204.zip
hostap-history-49b9ac533e845e1407f73111bf413b3ec796b204.tar.gz
hostap-history-49b9ac533e845e1407f73111bf413b3ec796b204.tar.bz2
Verify that basic rate set is a non-empty subset of supported rate set to
avoid invalid configuration.
-rw-r--r--driver/modules/hostap_ioctl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/driver/modules/hostap_ioctl.c b/driver/modules/hostap_ioctl.c
index 2be30b6..620b6ce 100644
--- a/driver/modules/hostap_ioctl.c
+++ b/driver/modules/hostap_ioctl.c
@@ -2310,6 +2310,13 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
#endif /* PRISM2_IO_DEBUG */
case PRISM2_PARAM_BASIC_RATES:
+ if ((value & local->tx_rate_control) != value || value == 0) {
+ printk(KERN_INFO "%s: invalid basic rate set - basic "
+ "rates must be in supported rate set\n",
+ dev->name);
+ ret = -EINVAL;
+ break;
+ }
local->basic_rates = value;
if (hostap_set_word(dev, HFA384X_RID_CNFBASICRATES,
local->basic_rates) ||