[PATCH] ath9k_htc: sync add_interface and remove_interface with mac80211

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ath9k_htc does not build against current wireless-testing due to recent
changes in mac80211 ("mac80211: remove struct ieee80211_if_init_conf").

Fix this by updating the add_interface and remove_interface callbacks to
use ieee80211_vif instead of ieee80211_if_init_conf.

Signed-off-by: Helmut Schaa <helmut.schaa@xxxxxxxxxxxxxx>
---
 ath/ath9k/ath9k_htc.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/ath/ath9k/ath9k_htc.c b/ath/ath9k/ath9k_htc.c
index 68653f5..b042c39 100644
--- a/ath/ath9k/ath9k_htc.c
+++ b/ath/ath9k/ath9k_htc.c
@@ -796,7 +796,7 @@ out:
 }
 
 static int ath9k_htc_add_interface(struct ieee80211_hw *hw,
-				   struct ieee80211_if_init_conf *conf)
+				   struct ieee80211_vif *vif)
 {
 	struct ath_htc_priv *priv = hw->priv;
 	struct ath9k_htc_fw_interface fw_interface;
@@ -815,9 +815,9 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw,
 
 	memset(&fw_interface, 0, sizeof(struct ath9k_htc_fw_interface));
 
-	memcpy(&fw_interface.myaddr, conf->mac_addr, ETH_ALEN);
+	memcpy(&fw_interface.myaddr, vif->addr, ETH_ALEN);
 
-	switch (conf->type) {
+	switch (vif->type) {
 	case NL80211_IFTYPE_STATION:
 		fw_interface.opmode = cpu_to_be32(ATH9K_HTC_FW_MODE_STA);
 		break;
@@ -826,26 +826,26 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw,
 		break;
 	default:
 		ath_print(common, ATH_DBG_FATAL,
-			  "Interface type %d not yet supported\n", conf->type);
+			  "Interface type %d not yet supported\n", vif->type);
 		goto out;
 
 	}
 
 	ath_print(common, ATH_DBG_CONFIG,
-		  "Adding a VIF of type: %d\n", conf->type);
+		  "Adding a VIF of type: %d\n", vif->type);
 
 	priv->nvifs++;
 
 	if (priv->nvifs > 1)
 		goto out; /* skip global settings for secondary vif */
 
-	if (conf->type == NL80211_IFTYPE_AP) {
+	if (vif->type == NL80211_IFTYPE_AP) {
 		ath9k_hw_set_tsfadjust(ah, 1);
 		priv->op_flags |= SC_OP_TSF_RESET;
 	}
 
 	/* Set the device opmode */
-	ah->opmode = conf->type;
+	ah->opmode = vif->type;
 
 	fw_interface.vif_index = priv->nvifs;
 	WMI_CMD_BUF(WMI_VAP_CREATE_CMDID, &fw_interface);
@@ -856,7 +856,7 @@ out:
 }
 
 static void ath9k_htc_remove_interface(struct ieee80211_hw *hw,
-				       struct ieee80211_if_init_conf *conf)
+				       struct ieee80211_vif *vif)
 {
 	struct ath_htc_priv *priv = hw->priv;
 	struct ath_hw *ah = priv->ah;
@@ -874,7 +874,7 @@ static void ath9k_htc_remove_interface(struct ieee80211_hw *hw,
 		goto out;
 
 	ath_print(common, ATH_DBG_CONFIG,
-		  "Romoving a VIF of type: %d\n", conf->type);
+		  "Romoving a VIF of type: %d\n", vif->type);
 
 	/*
 	 * Quiesce the hardware while we remove the interface. In
-- 
1.6.0.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux