Cumulative patch from commit c2db79f2376c61c21918162fb2222a66c029fa48
c2db79f VLAN: Remove vlan_tail
f7b4ef2 TDLS: Handle transmission failures of TPK Handshake messages
a2ea8d6 P2P: Fix invalid remain-on-channel duration for frame TX
cbf41ca P2P: Do not delay retries on failure during group formation
dc01de8 nl80211: Fix TDLS key configuration to not set TX key index
Change-Id: Id2418699c3ce49a7e198ab9c0d718ab4a713df62
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index eaecc36..9b0e6d7 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4893,6 +4893,7 @@
int ifindex;
struct nl_msg *msg;
int ret;
+ int tdls = 0;
/* Ignore for P2P Device */
if (drv->nlmode == NL80211_IFTYPE_P2P_DEVICE)
@@ -4904,8 +4905,10 @@
__func__, ifindex, ifname, alg, addr, key_idx, set_tx,
(unsigned long) seq_len, (unsigned long) key_len);
#ifdef CONFIG_TDLS
- if (key_idx == -1)
+ if (key_idx == -1) {
key_idx = 0;
+ tdls = 1;
+ }
#endif /* CONFIG_TDLS */
msg = nlmsg_alloc();
@@ -4995,7 +4998,7 @@
* If we failed or don't need to set the default TX key (below),
* we're done here.
*/
- if (ret || !set_tx || alg == WPA_ALG_NONE)
+ if (ret || !set_tx || alg == WPA_ALG_NONE || tdls)
return ret;
if (is_ap_interface(drv->nlmode) && addr &&
!is_broadcast_ether_addr(addr))