[PATCH] mesh: fixup "driver: add new NL80211 cmds to support mesh ifaces"

Bob Copeland me
Tue Sep 30 21:05:06 PDT 2014


The original commit broke TDLS by not setting supported
rates if params.set was true.  Amend this hunk to restore
the previous functionality.

This patch can be folded into the original.

Signed-off-by: Bob Copeland <me at bobcopeland.com>

---
cfg80211_check_station_change() in the kernel rejects set_station()
calls with supp rates on any station type except the TDLS_PEER_SETUP,
so this seems like the easiest way to make both mesh and tdls happy.

Jouni, do you prefer fixups on top like this for now, or would you
rather have me respin the patch in question?

 src/drivers/driver_nl80211.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 9b7936b..35e1f65 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -7754,12 +7754,13 @@ static int wpa_driver_nl80211_sta_add(void *priv,
 	NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, if_nametoindex(bss->ifname));
 	NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, params->addr);
 
-	if (!params->set) {
+	if (!params->set || (params->flags & WPA_STA_TDLS_PEER)) {
 		NLA_PUT(msg, NL80211_ATTR_STA_SUPPORTED_RATES,
 			params->supp_rates_len, params->supp_rates);
 		wpa_hexdump(MSG_DEBUG, "  * supported rates",
 			    params->supp_rates, params->supp_rates_len);
-
+	}
+	if (!params->set) {
 		if (params->aid) {
 			wpa_printf(MSG_DEBUG, "  * aid=%u", params->aid);
 			NLA_PUT_U16(msg, NL80211_ATTR_STA_AID, params->aid);
-- 
2.1.0.rc1




More information about the Hostap mailing list