mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
for adhoc and ahdemo modes try to find the "bss node": use the bssid
unless it's not setup or zero's; this may not work as the bssid of the ibss isn't certain to the "right mac address" but for many cases it is
This commit is contained in:
parent
e4d9b9eb18
commit
9adb9237bf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=188210
@ -437,15 +437,24 @@ getbssid(struct wlanstatfoo_p *wf)
|
||||
static void
|
||||
wlan_setstamac(struct wlanstatfoo *wf0, const uint8_t *mac)
|
||||
{
|
||||
static const uint8_t zeromac[IEEE80211_ADDR_LEN];
|
||||
struct wlanstatfoo_p *wf = (struct wlanstatfoo_p *) wf0;
|
||||
|
||||
if (mac == NULL) {
|
||||
switch (wlan_getopmode(wf0)) {
|
||||
case IEEE80211_M_HOSTAP:
|
||||
case IEEE80211_M_MONITOR:
|
||||
getlladdr(wf);
|
||||
break;
|
||||
case IEEE80211_M_IBSS:
|
||||
case IEEE80211_M_AHDEMO:
|
||||
getlladdr(wf);
|
||||
/*
|
||||
* NB: this may not work in which case the
|
||||
* mac must be specified on the command line
|
||||
*/
|
||||
if (getbssid(wf) < 0 ||
|
||||
IEEE80211_ADDR_EQ(wf->mac, zeromac))
|
||||
getlladdr(wf);
|
||||
break;
|
||||
case IEEE80211_M_STA:
|
||||
if (getbssid(wf) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user