mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
station: Ignore ad-hoc networks in scan results
If there are Ad-hoc BSSes they should be present in the scan results together with regular APs as far as scan.c is concerned. But in station mode we can't connect to them -- the Connect method will fail and autoconnect would fail. Since we have no property to indicate a network is an IBSS just filter these results out for now. There are perhaps better solutions but the benefit is very low.
This commit is contained in:
parent
dc87830aac
commit
6e70c84f8e
@ -41,7 +41,6 @@ typedef void (*scan_freq_set_func_t)(uint32_t freq, void *userdata);
|
|||||||
|
|
||||||
struct scan_freq_set;
|
struct scan_freq_set;
|
||||||
struct ie_rsn_info;
|
struct ie_rsn_info;
|
||||||
enum ie_bss_capability;
|
|
||||||
|
|
||||||
struct scan_bss {
|
struct scan_bss {
|
||||||
uint8_t addr[6];
|
uint8_t addr[6];
|
||||||
|
@ -264,6 +264,11 @@ static struct network *station_add_seen_bss(struct station *station,
|
|||||||
memcpy(ssid, bss->ssid, bss->ssid_len);
|
memcpy(ssid, bss->ssid, bss->ssid_len);
|
||||||
ssid[bss->ssid_len] = '\0';
|
ssid[bss->ssid_len] = '\0';
|
||||||
|
|
||||||
|
if (!(bss->capability & IE_BSS_CAP_ESS)) {
|
||||||
|
l_debug("Ignoring non-ESS BSS \"%s\"", ssid);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
memset(&info, 0, sizeof(info));
|
memset(&info, 0, sizeof(info));
|
||||||
r = scan_bss_get_rsn_info(bss, &info);
|
r = scan_bss_get_rsn_info(bss, &info);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user