[PATCH 3/3] Add mesh support
Kalle Valo
kvalo at qca.qualcomm.com
Tue May 28 04:23:14 EDT 2013
Did a quick test with ath9k_htc and carl9170. As wcn36xx only
is able to add one sta at the moment, direct connection to a third
mesh point won't work but luckily mesh protocol routed it through
the second node :)
Signed-off-by: Kalle Valo <kvalo at qca.qualcomm.com>
---
main.c | 13 +++++++++----
smd.c | 6 ++++--
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/main.c b/main.c
index a9d58db..53d864e 100644
--- a/main.c
+++ b/main.c
@@ -312,7 +312,8 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
wcn->beacon_interval);
wcn36xx_smd_send_beacon(wcn, skb, tim_off, 0);
- if (vif->type == NL80211_IFTYPE_ADHOC)
+ if (vif->type == NL80211_IFTYPE_ADHOC ||
+ vif->type == NL80211_IFTYPE_MESH_POINT)
link_state = WCN36XX_HAL_LINK_IBSS_STATE;
else
link_state = WCN36XX_HAL_LINK_AP_STATE;
@@ -355,6 +356,7 @@ static int wcn36xx_add_interface(struct ieee80211_hw *hw,
wcn36xx_smd_add_sta_self(wcn, vif->addr, 0);
break;
case NL80211_IFTYPE_ADHOC:
+ case NL80211_IFTYPE_MESH_POINT:
wcn36xx_smd_add_sta_self(wcn, vif->addr, 0);
break;
default:
@@ -376,7 +378,8 @@ static int wcn36xx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
wcn36xx_dbg(WCN36XX_DBG_MAC, "mac sta add vif %p sta %pM",
vif, sta->addr);
- if (vif->type == NL80211_IFTYPE_ADHOC)
+ if (vif->type == NL80211_IFTYPE_ADHOC ||
+ vif->type == NL80211_IFTYPE_MESH_POINT)
wcn36xx_smd_config_sta(wcn, wcn->addresses[0].addr,
sta->addr);
@@ -391,7 +394,8 @@ static int wcn36xx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif
wcn36xx_dbg(WCN36XX_DBG_MAC, "mac sta remove vif %p sta %pM",
vif, sta->addr);
- if (vif->type == NL80211_IFTYPE_ADHOC)
+ if (vif->type == NL80211_IFTYPE_ADHOC ||
+ vif->type == NL80211_IFTYPE_MESH_POINT)
wcn36xx_smd_delete_sta(wcn);
return 0;
@@ -576,7 +580,8 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
wcn->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_AP) |
- BIT(NL80211_IFTYPE_ADHOC);
+ BIT(NL80211_IFTYPE_ADHOC) |
+ BIT(NL80211_IFTYPE_MESH_POINT);
wcn->hw->wiphy->iface_combinations = &if_comb;
wcn->hw->wiphy->n_iface_combinations = 1;
diff --git a/smd.c b/smd.c
index 67361b6..aa719a1 100644
--- a/smd.c
+++ b/smd.c
@@ -460,7 +460,8 @@ int wcn36xx_smd_config_sta(struct wcn36xx *wcn, const u8 *bssid,
sta->aid = wcn->aid;
- if (wcn->iftype == NL80211_IFTYPE_ADHOC)
+ if (wcn->iftype == NL80211_IFTYPE_ADHOC ||
+ wcn->iftype == NL80211_IFTYPE_MESH_POINT)
sta->type = 1;
else
sta->type = 0;
@@ -681,7 +682,8 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, enum nl80211_iftype type,
/* AP */
bss->oper_mode = 0;
- } else if (type == NL80211_IFTYPE_ADHOC) {
+ } else if (type == NL80211_IFTYPE_ADHOC ||
+ type == NL80211_IFTYPE_MESH_POINT) {
bss->bss_type = WCN36XX_HAL_IBSS_MODE;
/* STA */
More information about the wcn36xx
mailing list