aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap/hostap_ioctl.c
diff options
context:
space:
mode:
authorJouni Malinen <jkmaline@cc.hut.fi>2005-07-30 15:50:01 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-07-30 18:17:22 -0400
commit72ca9c61cddb82a8596cee8141656d50aba42be5 (patch)
treefe2fa88ebe7d39538e6d4789d29db0e5a58b50b3 /drivers/net/wireless/hostap/hostap_ioctl.c
parentf06ac319c05c6822f878f201ae80e54fbbe8be8c (diff)
[PATCH] hostap update
Added support for setting channel mask for scan requests ('iwpriv wlan0 scan_channels 0x00ff' masks scans to use channels 1-8). Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_ioctl.c')
-rw-r--r--drivers/net/wireless/hostap/hostap_ioctl.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index e545ac9c1b10..4c236e7903f5 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1664,7 +1664,8 @@ static int prism2_request_hostscan(struct net_device *dev,
1664 local = iface->local; 1664 local = iface->local;
1665 1665
1666 memset(&scan_req, 0, sizeof(scan_req)); 1666 memset(&scan_req, 0, sizeof(scan_req));
1667 scan_req.channel_list = __constant_cpu_to_le16(local->channel_mask); 1667 scan_req.channel_list = cpu_to_le16(local->channel_mask &
1668 local->scan_channel_mask);
1668 scan_req.txrate = __constant_cpu_to_le16(HFA384X_RATES_1MBPS); 1669 scan_req.txrate = __constant_cpu_to_le16(HFA384X_RATES_1MBPS);
1669 if (ssid) { 1670 if (ssid) {
1670 if (ssid_len > 32) 1671 if (ssid_len > 32)
@@ -1693,7 +1694,8 @@ static int prism2_request_scan(struct net_device *dev)
1693 local = iface->local; 1694 local = iface->local;
1694 1695
1695 memset(&scan_req, 0, sizeof(scan_req)); 1696 memset(&scan_req, 0, sizeof(scan_req));
1696 scan_req.channel_list = __constant_cpu_to_le16(local->channel_mask); 1697 scan_req.channel_list = cpu_to_le16(local->channel_mask &
1698 local->scan_channel_mask);
1697 scan_req.txrate = __constant_cpu_to_le16(HFA384X_RATES_1MBPS); 1699 scan_req.txrate = __constant_cpu_to_le16(HFA384X_RATES_1MBPS);
1698 1700
1699 /* FIX: 1701 /* FIX:
@@ -2338,6 +2340,10 @@ static const struct iw_priv_args prism2_priv[] = {
2338 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "drop_unencrypte" }, 2340 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "drop_unencrypte" },
2339 { PRISM2_PARAM_DROP_UNENCRYPTED, 2341 { PRISM2_PARAM_DROP_UNENCRYPTED,
2340 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getdrop_unencry" }, 2342 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getdrop_unencry" },
2343 { PRISM2_PARAM_SCAN_CHANNEL_MASK,
2344 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "scan_channels" },
2345 { PRISM2_PARAM_SCAN_CHANNEL_MASK,
2346 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getscan_channel" },
2341}; 2347};
2342 2348
2343 2349
@@ -2699,6 +2705,10 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
2699 local->drop_unencrypted = value; 2705 local->drop_unencrypted = value;
2700 break; 2706 break;
2701 2707
2708 case PRISM2_PARAM_SCAN_CHANNEL_MASK:
2709 local->scan_channel_mask = value;
2710 break;
2711
2702 default: 2712 default:
2703 printk(KERN_DEBUG "%s: prism2_param: unknown param %d\n", 2713 printk(KERN_DEBUG "%s: prism2_param: unknown param %d\n",
2704 dev->name, param); 2714 dev->name, param);
@@ -2890,6 +2900,10 @@ static int prism2_ioctl_priv_get_prism2_param(struct net_device *dev,
2890 *param = local->drop_unencrypted; 2900 *param = local->drop_unencrypted;
2891 break; 2901 break;
2892 2902
2903 case PRISM2_PARAM_SCAN_CHANNEL_MASK:
2904 *param = local->scan_channel_mask;
2905 break;
2906
2893 default: 2907 default:
2894 printk(KERN_DEBUG "%s: get_prism2_param: unknown param %d\n", 2908 printk(KERN_DEBUG "%s: get_prism2_param: unknown param %d\n",
2895 dev->name, *param); 2909 dev->name, *param);