ap: rename ap_parse_ie to be more descriptive
PATCH 1/2 ap: rename ap_parse_ie to be more descriptive
This is only used for NEW_STATION parsing so name appropriately
--- src/ap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
src/ap.c +5 -3
@@ -2197,8 +2197,9 @@ error:ap_start_failed (ap); } -static bool ap_parse_ie (const void *data,uint16_t len,uint8_t **rsn_out, -struct l_uintset **rates_out) +static bool ap_parse_new_station_ies (const void *data,uint16_t len, +uint8_t **rsn_out, +struct l_uintset **rates_out) {struct ie_tlv_iter iter;uint8_t *rsn =NULL ;
@@ -2255,7 +2256,8 @@ static void ap_handle_new_station(struct ap_state *ap, struct l_genl_msg *msg)while (l_genl_attr_next (&attr, &type, &len, &data)) {switch (type) {case NL80211_ATTR_IE : -if (!ap_parse_ie (data, len, &assoc_rsne, &rates)) +if (!ap_parse_new_station_ies (data, len, &assoc_rsne, + &rates))return ;break ;case NL80211_ATTR_MAC :
Signature · 1 line
2.26.2
PATCH 2/2 ap: handle GET_KEY error setting RSC to zero
Rather than the previous hack which disabled group traffic it was found that the GTK RSC could be manually set to zero which allows group traffic. This appears to fix AP mode on brcmfmac along with the previous fixes. This is not documented in nl80211, but appears to work with this driver.
--- src/ap.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
src/ap.c +3 -5
@@ -787,6 +787,7 @@ static void ap_gtk_query_cb(struct l_genl_msg *msg, void *user_data) {struct sta_state *sta = user_data;const void *gtk_rsc; +uint8_t zero_gtk_rsc[6 ]; sta->gtk_query_cmd_id =0 ;
@@ -795,11 +796,8 @@ static void ap_gtk_query_cb(struct l_genl_msg *msg, void *user_data) gtk_rsc =nl80211_parse_get_key_seq (msg);if (!gtk_rsc) { -/* Try allowing connection with no group traffic */ -l_warn ("Failed to get GTK. This may be a driver/FW issue, " -"disabling group traffic" ); -ap_start_rsna (sta,NULL ); -return ; +memset (zero_gtk_rsc,0 ,6 ); + gtk_rsc = zero_gtk_rsc; }ap_start_rsna (sta, gtk_rsc);
Signature · 1 line
2.26.2
Hi James,
Quoted 5 lines · James Prestwood
This is only used for
NEW_STATIONparsing so name appropriately--- src/ap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
Both applied, thanks.
Regards,
-Denis