scanresults is now in. Yay!

This commit is contained in:
solomon 2002-09-30 21:12:55 +00:00
parent a347a3e6da
commit acfcee1d9e
4 changed files with 145 additions and 9 deletions

View file

@ -44,7 +44,7 @@
- Adhoc mode was auto-roaming onto "any" SSID. Fixed.
- Implemented the dot11req_scan/dot11req_scan_results functions.
This, combined with more intelligent startup scripts, will allow
you to have profiles per network.
you to per-network profiles.
- hfa384x.h updates.
- additions to the MIB.
- Rewrote most of the existing wireless extension code.

View file

@ -209,6 +209,8 @@
#define WLAN_HDR_A3_DATAP(p) (((UINT8*)(p)) + WLAN_HDR_A3_LEN)
#define WLAN_HDR_A4_DATAP(p) (((UINT8*)(p)) + WLAN_HDR_A4_LEN)
#define DOT11_RATE5_ISBASIC_GET(r) (((UINT8)(r)) & BIT7)
/*================================================================*/
/* Types */

View file

@ -508,18 +508,40 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp)
req->ssid.data.len = item->ssid.len;
memcpy(req->ssid.data.data, item->ssid.data, item->ssid.len);
#if 0
/* supported rates */
for (count = 0; count < 10 ; count++)
if (item->supprates[count] == 0)
break;
req->rates.status = P80211ENUM_msgitem_status_data_ok;
req->rates.data.len = count;
memcpy(req->rates.data.data, item->supprates, count);
// XXX re-write to use "basicrate1-n, operationarate1-n"
#endif
#define REQBASICRATE(N) \
if ((count >= N) && DOT11_RATE5_ISBASIC_GET(item->supprates[(N)-1])) { \
req->basicrate ## N .data = item->supprates[(N)-1]; \
req->basicrate ## N .status = P80211ENUM_msgitem_status_data_ok; \
}
REQBASICRATE(1);
REQBASICRATE(2);
REQBASICRATE(3);
REQBASICRATE(4);
REQBASICRATE(5);
REQBASICRATE(6);
REQBASICRATE(7);
REQBASICRATE(8);
#define REQSUPPRATE(N) \
if (count >= N) { \
req->supprate ## N .data = item->supprates[(N)-1]; \
req->supprate ## N .status = P80211ENUM_msgitem_status_data_ok; \
}
REQSUPPRATE(1);
REQSUPPRATE(2);
REQSUPPRATE(3);
REQSUPPRATE(4);
REQSUPPRATE(5);
REQSUPPRATE(6);
REQSUPPRATE(7);
REQSUPPRATE(8);
/* beacon period */
req->beaconperiod.status = P80211ENUM_msgitem_status_data_ok;

View file

@ -904,7 +904,119 @@ p80211meta_t MKREQMETANAME(dot11req_scan_results)[] = {
/* totextptr */ p80211_totext_boundedint,
/* fromtextptr */ p80211_fromtext_boundedint,
/* validfunptr */ p80211_isvalid_boundedint
}
},
{
/* name */ MKITEMNAME("supprate1"),
/* did */ 0,
/* flags */ P80211ITEM_SETFLAGS(ISREQUIRED, 0UL, ISCONFIRM),
/* min */ 2,
/* max */ 127,
/* maxlen */ 0,
/* minlen */ 0,
/* enumptr */ NULL,
/* collptr */ NULL,
/* totextptr */ p80211_totext_boundedint,
/* fromtextptr */ p80211_fromtext_boundedint,
/* validfunptr */ p80211_isvalid_boundedint
},
{
/* name */ MKITEMNAME("supprate2"),
/* did */ 0,
/* flags */ P80211ITEM_SETFLAGS(ISREQUIRED, 0UL, ISCONFIRM),
/* min */ 2,
/* max */ 127,
/* maxlen */ 0,
/* minlen */ 0,
/* enumptr */ NULL,
/* collptr */ NULL,
/* totextptr */ p80211_totext_boundedint,
/* fromtextptr */ p80211_fromtext_boundedint,
/* validfunptr */ p80211_isvalid_boundedint
},
{
/* name */ MKITEMNAME("supprate3"),
/* did */ 0,
/* flags */ P80211ITEM_SETFLAGS(ISREQUIRED, 0UL, ISCONFIRM),
/* min */ 2,
/* max */ 127,
/* maxlen */ 0,
/* minlen */ 0,
/* enumptr */ NULL,
/* collptr */ NULL,
/* totextptr */ p80211_totext_boundedint,
/* fromtextptr */ p80211_fromtext_boundedint,
/* validfunptr */ p80211_isvalid_boundedint
},
{
/* name */ MKITEMNAME("supprate4"),
/* did */ 0,
/* flags */ P80211ITEM_SETFLAGS(ISREQUIRED, 0UL, ISCONFIRM),
/* min */ 2,
/* max */ 127,
/* maxlen */ 0,
/* minlen */ 0,
/* enumptr */ NULL,
/* collptr */ NULL,
/* totextptr */ p80211_totext_boundedint,
/* fromtextptr */ p80211_fromtext_boundedint,
/* validfunptr */ p80211_isvalid_boundedint
},
{
/* name */ MKITEMNAME("supprate5"),
/* did */ 0,
/* flags */ P80211ITEM_SETFLAGS(ISREQUIRED, 0UL, ISCONFIRM),
/* min */ 2,
/* max */ 127,
/* maxlen */ 0,
/* minlen */ 0,
/* enumptr */ NULL,
/* collptr */ NULL,
/* totextptr */ p80211_totext_boundedint,
/* fromtextptr */ p80211_fromtext_boundedint,
/* validfunptr */ p80211_isvalid_boundedint
},
{
/* name */ MKITEMNAME("supprate6"),
/* did */ 0,
/* flags */ P80211ITEM_SETFLAGS(ISREQUIRED, 0UL, ISCONFIRM),
/* min */ 2,
/* max */ 127,
/* maxlen */ 0,
/* minlen */ 0,
/* enumptr */ NULL,
/* collptr */ NULL,
/* totextptr */ p80211_totext_boundedint,
/* fromtextptr */ p80211_fromtext_boundedint,
/* validfunptr */ p80211_isvalid_boundedint
},
{
/* name */ MKITEMNAME("supprate7"),
/* did */ 0,
/* flags */ P80211ITEM_SETFLAGS(ISREQUIRED, 0UL, ISCONFIRM),
/* min */ 2,
/* max */ 127,
/* maxlen */ 0,
/* minlen */ 0,
/* enumptr */ NULL,
/* collptr */ NULL,
/* totextptr */ p80211_totext_boundedint,
/* fromtextptr */ p80211_fromtext_boundedint,
/* validfunptr */ p80211_isvalid_boundedint
},
{
/* name */ MKITEMNAME("supprate8"),
/* did */ 0,
/* flags */ P80211ITEM_SETFLAGS(ISREQUIRED, 0UL, ISCONFIRM),
/* min */ 2,
/* max */ 127,
/* maxlen */ 0,
/* minlen */ 0,
/* enumptr */ NULL,
/* collptr */ NULL,
/* totextptr */ p80211_totext_boundedint,
/* fromtextptr */ p80211_fromtext_boundedint,
/* validfunptr */ p80211_isvalid_boundedint
},
}; /* end of dot11req_scan_results metadata list */
UINT32 MKREQMETASIZE(dot11req_scan_results) =