[PATCH 4/4] Configure correct AID and sta_index in AP mode

Eugene Krasnikov k.eugene.e at gmail.com
Fri Jul 5 02:45:07 EDT 2013


Encrypted AP mode was not working because of misconfiguration.

Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
---
 main.c | 5 +++--
 smd.c  | 8 +++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/main.c b/main.c
index f3a6fb9..f665488 100644
--- a/main.c
+++ b/main.c
@@ -696,10 +696,11 @@ static int wcn36xx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 
 	if (vif->type == NL80211_IFTYPE_ADHOC ||
 	    vif->type == NL80211_IFTYPE_AP ||
-	    vif->type == NL80211_IFTYPE_MESH_POINT)
+	    vif->type == NL80211_IFTYPE_MESH_POINT) {
+		wcn->aid = sta->aid;
 		wcn36xx_smd_config_sta(wcn, wcn->addresses[0].addr,
 				       sta->addr);
-
+	}
 	return 0;
 }
 
diff --git a/smd.c b/smd.c
index ce09563..b683988 100644
--- a/smd.c
+++ b/smd.c
@@ -526,7 +526,13 @@ int wcn36xx_smd_config_sta(struct wcn36xx *wcn, const u8 *bssid,
 	sta->delayed_ba_support = 0;
 	sta->max_ampdu_duration = 0;
 	sta->dsss_cck_mode_40mhz = 0;
-	sta->sta_index = 1;
+	if (wcn->iftype == NL80211_IFTYPE_ADHOC ||
+	    wcn->iftype == NL80211_IFTYPE_AP ||
+	    wcn->iftype == NL80211_IFTYPE_MESH_POINT)
+		sta->sta_index = 0xFF;
+	else
+		sta->sta_index = 1;
+
 	sta->bssid_index = 0;
 	sta->p2p = 0;
 
-- 
1.7.11.3




More information about the wcn36xx mailing list