From 3cbf5674587d6cdb9771e5d5e6114a098aae8708 Mon Sep 17 00:00:00 2001 From: David Lin Date: Fri, 3 Jun 2016 14:56:44 +0800 Subject: [PATCH] Added the code to support TDLS. Signed-off-by: David Lin --- mac80211.c | 2 ++ main.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mac80211.c b/mac80211.c index ccf39c75..cdf9f502 100644 --- a/mac80211.c +++ b/mac80211.c @@ -473,6 +473,8 @@ static int mwl_mac80211_sta_add(struct ieee80211_hw *hw, sta_info->amsdu_ctrl.cap = MWL_AMSDU_SIZE_8K; else sta_info->amsdu_ctrl.cap = MWL_AMSDU_SIZE_4K; + if ((sta->tdls) && (!sta->wme)) + sta->wme = true; } sta_info->iv16 = 1; sta_info->iv32 = 0; diff --git a/main.c b/main.c index 5d8b4211..3543a439 100644 --- a/main.c +++ b/main.c @@ -551,6 +551,8 @@ static int mwl_wl_init(struct mwl_priv *priv) hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH; + hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS; + hw->vif_data_size = sizeof(struct mwl_vif); hw->sta_data_size = sizeof(struct mwl_sta);