summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eea06a3)
raw | patch | inline | side by side (parent: eea06a3)
author | KN <sudharshan@ti.com> | |
Tue, 9 Jun 2020 21:03:47 +0000 (16:03 -0500) | ||
committer | KN <sudharshan@ti.com> | |
Tue, 9 Jun 2020 21:03:47 +0000 (16:03 -0500) |
1. Send the max_peer parameter to the driver even if user_mpm is set
mac80211 is using this param when building the beacon.
2. When receiving a peer's beacon - check the the capability bit that
indicates if peer is accepting new connections. Do not initiate
connection with this peer if bit is not set.
fixes #WILINK8_SW_DEV-439
#WILINK8_SW_DEV-417
Signed-off-by: KN <sudharshan@ti.com>
mac80211 is using this param when building the beacon.
2. When receiving a peer's beacon - check the the capability bit that
indicates if peer is accepting new connections. Do not initiate
connection with this peer if bit is not set.
fixes #WILINK8_SW_DEV-439
#WILINK8_SW_DEV-417
Signed-off-by: KN <sudharshan@ti.com>
src/common/ieee802_11_defs.h | patch | blob | history | |
wpa_supplicant/mesh_mpm.c | patch | blob | history |
index b0aa913bbc9a73d8a4ec21ed5ce496b28030cd6d..b06b6632a0a3cd9c583ab9e41cac8534c81faf30 100644 (file)
#define WLAN_TIMEOUT_KEY_LIFETIME 2
#define WLAN_TIMEOUT_ASSOC_COMEBACK 3
+/* Mesh config info element - capability options*/
+#define WLAN_MESHCONF_CAPAB_ACCEPT_PLINKS 0x01
+#define WLAN_MESHCONF_CAPAB_FORWARDING 0x08
+#define WLAN_MESHCONF_CAPAB_TBTT_ADJUSTING 0x20
+#define WLAN_MESHCONF_CAPAB_POWER_SAVE_LEVEL 0x40
+
/* Interworking element (IEEE 802.11u) - Access Network Options */
#define INTERWORKING_ANO_ACCESS_NETWORK_MASK 0x0f
#define INTERWORKING_ANO_INTERNET 0x10
u8 basic_mcs_set[16];
} STRUCT_PACKED;
+/* Mesh Config element */
+struct ieee80211_mesh_config {
+ u8 psel;
+ u8 pmetric;
+ u8 congest;
+ u8 synch;
+ u8 auth_prot;
+ u8 form_info;
+ u8 capab;
+} STRUCT_PACKED;
+
struct ieee80211_obss_scan_parameters {
le16 scan_passive_dwell;
index 4a163b6eb6d80e42c14b5a4ea425c6fe3175e85d..cc5d29cefb4645ed41f7de7661cfbf3cc6143e4c 100644 (file)
struct hostapd_data *data = wpa_s->ifmsh->bss[0];
struct sta_info *sta;
struct wpa_ssid *ssid = wpa_s->current_ssid;
+ struct ieee80211_mesh_config *mesh_conf_ie =
+ (struct ieee80211_mesh_config *)elems->mesh_config;
sta = mesh_mpm_add_peer(wpa_s, addr, elems);
if (!sta)
return;
- if (ssid && ssid->no_auto_peer &&
- (is_zero_ether_addr(data->mesh_required_peer) ||
- os_memcmp(data->mesh_required_peer, addr, ETH_ALEN) != 0)) {
- wpa_msg(wpa_s, MSG_INFO, "will not initiate new peer link with "
- MACSTR " because of no_auto_peer", MAC2STR(addr));
+ /* check if peer accepts new connection. Don't initiate link if peer is full*/
+ if ((ssid && ssid->no_auto_peer &&
+ (is_zero_ether_addr(data->mesh_required_peer) ||
+ os_memcmp(data->mesh_required_peer, addr, ETH_ALEN) != 0)) ||
+ !(mesh_conf_ie->capab & WLAN_MESHCONF_CAPAB_ACCEPT_PLINKS)) {
+ wpa_msg(wpa_s, MSG_ERROR, "will not initiate new peer link with "
+ MACSTR " either no_auto_peer or peer does not allow new links", MAC2STR(addr));
if (data->mesh_pending_auth) {
struct os_reltime age;
const struct ieee80211_mgmt *mgmt;