aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@gmail.com>2008-08-21 18:27:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-22 19:28:04 -0400
commit0753bba2d45762f83b9f4db94d15a3047f592964 (patch)
tree30255adb9f85e7806681aa43aac9588b8ecac391 /drivers/net/wireless
parent9859b81eaeb8d48563b5fbd90215c0ae606455a3 (diff)
orinoco: Add ESSID specific scanning for Agere fw
Pass the ESSID to the card. This allows 'iwlist eth1 scan essid <essid>' to work, and will help with routers setup not to broadcast the ESSID. Signed-off-by: David Kilroy <kilroyd@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/orinoco.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index 1ebcafe7ca5f..a60b459a9a99 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -2982,6 +2982,11 @@ static int orinoco_ioctl_getiwrange(struct net_device *dev,
2982 range->min_r_time = 0; 2982 range->min_r_time = 0;
2983 range->max_r_time = 65535 * 1000; /* ??? */ 2983 range->max_r_time = 65535 * 1000; /* ??? */
2984 2984
2985 if (priv->firmware_type == FIRMWARE_TYPE_AGERE)
2986 range->scan_capa = IW_SCAN_CAPA_ESSID;
2987 else
2988 range->scan_capa = IW_SCAN_CAPA_NONE;
2989
2985 /* Event capability (kernel) */ 2990 /* Event capability (kernel) */
2986 IW_EVENT_CAPA_SET_KERNEL(range->event_capa); 2991 IW_EVENT_CAPA_SET_KERNEL(range->event_capa);
2987 /* Event capability (driver) */ 2992 /* Event capability (driver) */
@@ -3951,6 +3956,7 @@ static int orinoco_ioctl_setscan(struct net_device *dev,
3951{ 3956{
3952 struct orinoco_private *priv = netdev_priv(dev); 3957 struct orinoco_private *priv = netdev_priv(dev);
3953 hermes_t *hw = &priv->hw; 3958 hermes_t *hw = &priv->hw;
3959 struct iw_scan_req *si = (struct iw_scan_req *) extra;
3954 int err = 0; 3960 int err = 0;
3955 unsigned long flags; 3961 unsigned long flags;
3956 3962
@@ -4012,7 +4018,19 @@ static int orinoco_ioctl_setscan(struct net_device *dev,
4012 } 4018 }
4013 break; 4019 break;
4014 case FIRMWARE_TYPE_AGERE: 4020 case FIRMWARE_TYPE_AGERE:
4015 err = hermes_write_wordrec(hw, USER_BAP, 4021 if (priv->scan_mode & IW_SCAN_THIS_ESSID) {
4022 struct hermes_idstring idbuf;
4023 size_t len = min(sizeof(idbuf.val),
4024 (size_t) si->essid_len);
4025 idbuf.len = cpu_to_le16(len);
4026 memcpy(idbuf.val, si->essid, len);
4027
4028 err = hermes_write_ltv(hw, USER_BAP,
4029 HERMES_RID_CNFSCANSSID_AGERE,
4030 HERMES_BYTES_TO_RECLEN(len + 2),
4031 &idbuf);
4032 } else
4033 err = hermes_write_wordrec(hw, USER_BAP,
4016 HERMES_RID_CNFSCANSSID_AGERE, 4034 HERMES_RID_CNFSCANSSID_AGERE,
4017 0); /* Any ESSID */ 4035 0); /* Any ESSID */
4018 if (err) 4036 if (err)