Skip to contentSkip to conversation

carl9170: Add support for NL80211_IFTYPE_MESH_POINT interfaces

PATCH In review Javier Lopez 2 participants 2 messages Jul 27, 2012 CARL9170 Linux community wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 carl9170: Add support for NL80211_IFTYPE_MESH_POINT interfaces

This patch contains following modifications:

- Add mesh capabilities on fw.c to permit creation of mesh interfaces using this driver.

- Modify carl9170_set_operating_mode, to use AP-style beaconing with mesh interfaces.

- Allow beacon updates for NL80211_IFTYPE_MESH_POINT type in carl9170_handle_command_response.

- Add NL80211_IFTYPE_MESH_POINT case on carl9170_op_add_interfaces to support mesh/ap/sta virtual interface combinations.

---
v2: support mesh/ap/sta vif combinations (Christian)

 drivers/net/wireless/ath/carl9170/fw.c   |    1 +
 drivers/net/wireless/ath/carl9170/mac.c  |    2 +-
 drivers/net/wireless/ath/carl9170/main.c |    4 +++-
 drivers/net/wireless/ath/carl9170/rx.c   |    1 +
 4 files changed, 6 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/carl9170/fw.c +1 -0
index cba9d04..b03d7bf 100644
@@ -304,6 +304,7 @@ static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len)
 		if (SUPP(CARL9170FW_WLANTX_CAB)) {
 			if_comb_types |=
 				BIT(NL80211_IFTYPE_AP) |
+				BIT(NL80211_IFTYPE_MESH_POINT) |
 				BIT(NL80211_IFTYPE_P2P_GO);
 		}
 	}
drivers/net/wireless/ath/carl9170/mac.c +1 -1
index dfda919..a5f5fa0 100644
@@ -318,10 +318,10 @@ int carl9170_set_operating_mode(struct ar9170 *ar)
 		bssid = common->curbssid;
 
 		switch (vif->type) {
-		case NL80211_IFTYPE_MESH_POINT:
 		case NL80211_IFTYPE_ADHOC:
 			cam_mode |= AR9170_MAC_CAM_IBSS;
 			break;
+		case NL80211_IFTYPE_MESH_POINT:
 		case NL80211_IFTYPE_AP:
 			cam_mode |= AR9170_MAC_CAM_AP;
 
drivers/net/wireless/ath/carl9170/main.c +3 -1
index f06e069..4d6225c 100644
@@ -616,10 +616,12 @@ static int carl9170_op_add_interface(struct ieee80211_hw *hw,
 
 			goto unlock;
 
+		case NL80211_IFTYPE_MESH_POINT:
 		case NL80211_IFTYPE_AP:
 			if ((vif->type == NL80211_IFTYPE_STATION) ||
 			    (vif->type == NL80211_IFTYPE_WDS) ||
-			    (vif->type == NL80211_IFTYPE_AP))
+			    (vif->type == NL80211_IFTYPE_AP) ||
+			    (vif->type == NL80211_IFTYPE_MESH_POINT))
 				break;
 
 			err = -EBUSY;
drivers/net/wireless/ath/carl9170/rx.c +1 -0
index dc99030..3be2130 100644
@@ -206,6 +206,7 @@ void carl9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len)
 
 		case NL80211_IFTYPE_AP:
 		case NL80211_IFTYPE_ADHOC:
+		case NL80211_IFTYPE_MESH_POINT:
 			carl9170_update_beacon(ar, true);
 			break;
 
Signature · 1 line
1.7.9.5
maintainer Acked-by on v2 1/1
#1 lore raw
Quoted 8 lines · On Friday 27 July 2012 20:27:25 Javier Lopez wrote:

This patch contains following modifications:

- Add mesh capabilities on fw.c to permit creation of mesh interfaces using this driver.

- Modify carl9170_set_operating_mode, to use AP-style beaconing with mesh interfaces.

Quoted 7 lines

- Allow beacon updates for NL80211_IFTYPE_MESH_POINT type in carl9170_handle_command_response.

- Add NL80211_IFTYPE_MESH_POINT case on carl9170_op_add_interfaces to support mesh/ap/sta virtual interface combinations.