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>
This commit is contained in:
parent
9859b81eae
commit
0753bba2d4
1 changed files with 19 additions and 1 deletions
|
@ -2982,6 +2982,11 @@ static int orinoco_ioctl_getiwrange(struct net_device *dev,
|
||||||
range->min_r_time = 0;
|
range->min_r_time = 0;
|
||||||
range->max_r_time = 65535 * 1000; /* ??? */
|
range->max_r_time = 65535 * 1000; /* ??? */
|
||||||
|
|
||||||
|
if (priv->firmware_type == FIRMWARE_TYPE_AGERE)
|
||||||
|
range->scan_capa = IW_SCAN_CAPA_ESSID;
|
||||||
|
else
|
||||||
|
range->scan_capa = IW_SCAN_CAPA_NONE;
|
||||||
|
|
||||||
/* Event capability (kernel) */
|
/* Event capability (kernel) */
|
||||||
IW_EVENT_CAPA_SET_KERNEL(range->event_capa);
|
IW_EVENT_CAPA_SET_KERNEL(range->event_capa);
|
||||||
/* Event capability (driver) */
|
/* Event capability (driver) */
|
||||||
|
@ -3951,6 +3956,7 @@ static int orinoco_ioctl_setscan(struct net_device *dev,
|
||||||
{
|
{
|
||||||
struct orinoco_private *priv = netdev_priv(dev);
|
struct orinoco_private *priv = netdev_priv(dev);
|
||||||
hermes_t *hw = &priv->hw;
|
hermes_t *hw = &priv->hw;
|
||||||
|
struct iw_scan_req *si = (struct iw_scan_req *) extra;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
|
@ -4012,7 +4018,19 @@ static int orinoco_ioctl_setscan(struct net_device *dev,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FIRMWARE_TYPE_AGERE:
|
case FIRMWARE_TYPE_AGERE:
|
||||||
err = hermes_write_wordrec(hw, USER_BAP,
|
if (priv->scan_mode & IW_SCAN_THIS_ESSID) {
|
||||||
|
struct hermes_idstring idbuf;
|
||||||
|
size_t len = min(sizeof(idbuf.val),
|
||||||
|
(size_t) si->essid_len);
|
||||||
|
idbuf.len = cpu_to_le16(len);
|
||||||
|
memcpy(idbuf.val, si->essid, len);
|
||||||
|
|
||||||
|
err = hermes_write_ltv(hw, USER_BAP,
|
||||||
|
HERMES_RID_CNFSCANSSID_AGERE,
|
||||||
|
HERMES_BYTES_TO_RECLEN(len + 2),
|
||||||
|
&idbuf);
|
||||||
|
} else
|
||||||
|
err = hermes_write_wordrec(hw, USER_BAP,
|
||||||
HERMES_RID_CNFSCANSSID_AGERE,
|
HERMES_RID_CNFSCANSSID_AGERE,
|
||||||
0); /* Any ESSID */
|
0); /* Any ESSID */
|
||||||
if (err)
|
if (err)
|
||||||
|
|
Loading…
Add table
Reference in a new issue