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-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx>
---
This patch is against a recent tree which has the following patch applied
'orinoco: more reliable scan handling'
<http://article.gmane.org/gmane.linux.kernel.wireless.general/6686>
but should be simple enough to apply to a tree without it.
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index 24cec93..6411d61 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -3986,6 +3986,7 @@ static int orinoco_ioctl_setscan(struct net_device *dev,
{
struct orinoco_private *priv = netdev_priv(dev);
hermes_t *hw = &priv->hw;
+ struct iw_scan_req *si = (struct iw_scan_req*) extra;
int err = 0;
unsigned long flags;
@@ -4046,7 +4047,19 @@ static int orinoco_ioctl_setscan(struct net_device *dev,
}
break;
case FIRMWARE_TYPE_AGERE:
- err = hermes_write_wordrec(hw, USER_BAP,
+ if (flags & 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,
0); /* Any ESSID */
if (err)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|