[PATCH 2/2] wcn36xx: remove addresses from wcn36xx struct

Eugene Krasnikov k.eugene.e at gmail.com
Fri Sep 20 04:30:27 EDT 2013


Use local variable instead.

Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
---
 main.c    | 11 +++++------
 wcn36xx.h |  1 -
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/main.c b/main.c
index 12f61d5..500726e 100644
--- a/main.c
+++ b/main.c
@@ -890,9 +890,6 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
 	wcn->hw->wiphy->wowlan = &wowlan_support;
 #endif
 
-	wcn->hw->wiphy->n_addresses = 1;
-	wcn->hw->wiphy->addresses = &wcn->addresses;
-
 	wcn->hw->max_listen_interval = 200;
 
 	wcn->hw->queues = 4;
@@ -947,6 +944,8 @@ static int wcn36xx_probe(struct platform_device *pdev)
 	struct ieee80211_hw *hw;
 	struct wcn36xx *wcn;
 	int ret;
+	u8 addr[ETH_ALEN];
+
 	wcn36xx_dbg(WCN36XX_DBG_MAC, "platform probe\n");
 
 	hw = ieee80211_alloc_hw(sizeof(struct wcn36xx), &wcn36xx_ops);
@@ -963,9 +962,9 @@ static int wcn36xx_probe(struct platform_device *pdev)
 
 	mutex_init(&wcn->hal_mutex);
 
-	if (!wcn->ctrl_ops->get_hw_mac(wcn->addresses.addr)) {
-		wcn36xx_info("mac address: %pM\n", wcn->addresses.addr);
-		SET_IEEE80211_PERM_ADDR(wcn->hw, wcn->addresses.addr);
+	if (!wcn->ctrl_ops->get_hw_mac(addr)) {
+		wcn36xx_info("mac address: %pM\n", addr);
+		SET_IEEE80211_PERM_ADDR(wcn->hw, addr);
 	}
 
 	ret = wcn36xx_platform_get_resources(wcn, pdev);
diff --git a/wcn36xx.h b/wcn36xx.h
index 060fe88..97a5f18 100644
--- a/wcn36xx.h
+++ b/wcn36xx.h
@@ -169,7 +169,6 @@ struct wcn36xx_dxe_ch;
 struct wcn36xx {
 	struct ieee80211_hw	*hw;
 	struct device		*dev;
-	struct mac_address	addresses;
 	struct list_head	vif_list;
 
 	u8			fw_revision;
-- 
1.8.2.2




More information about the wcn36xx mailing list