All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath9k_htc: use ether_addr_copy() instead of memcpy()
       [not found] <87lhbylifx.fsf@kamboji.qca.qualcomm.com>
@ 2015-09-22 14:24 ` Oleksij Rempel
  2015-09-23 13:16   ` Sujith Manoharan
  0 siblings, 1 reply; 4+ messages in thread
From: Oleksij Rempel @ 2015-09-22 14:24 UTC (permalink / raw)
  To: kvalo, ath9k-devel, linux-wireless; +Cc: Oleksij Rempel

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 drivers/net/wireless/ath/ath9k/htc_drv_init.c |  2 +-
 drivers/net/wireless/ath/ath9k/htc_drv_main.c | 24 ++++++++++++------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 1e84882..254a1e4 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -587,7 +587,7 @@ static void ath9k_init_misc(struct ath9k_htc_priv *priv)
 {
 	struct ath_common *common = ath9k_hw_common(priv->ah);
 
-	memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN);
+	ether_addr_copy(common->bssidmask, ath_bcast_mac);
 
 	common->last_rssi = ATH_RSSI_DUMMY_MARKER;
 	priv->ah->opmode = NL80211_IFTYPE_STATION;
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 172a9ff..e6b13ed 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -159,10 +159,10 @@ static void ath9k_htc_set_mac_bssid_mask(struct ath9k_htc_priv *priv,
 		priv->hw, IEEE80211_IFACE_ITER_RESUME_ALL,
 		ath9k_htc_bssid_iter, &iter_data);
 
-	memcpy(common->bssidmask, iter_data.mask, ETH_ALEN);
+	ether_addr_copy(common->bssidmask, iter_data.mask);
 
 	if (iter_data.hw_macaddr)
-		memcpy(common->macaddr, iter_data.hw_macaddr, ETH_ALEN);
+		ether_addr_copy(common->macaddr, iter_data.hw_macaddr);
 
 	ath_hw_setbssidmask(common);
 }
@@ -338,7 +338,7 @@ static void __ath9k_htc_remove_monitor_interface(struct ath9k_htc_priv *priv)
 	u8 cmd_rsp;
 
 	memset(&hvif, 0, sizeof(struct ath9k_htc_target_vif));
-	memcpy(&hvif.myaddr, common->macaddr, ETH_ALEN);
+	ether_addr_copy(hvif.myaddr, common->macaddr);
 	hvif.index = priv->mon_vif_idx;
 	WMI_CMD_BUF(WMI_VAP_REMOVE_CMDID, &hvif);
 	if (ret) {
@@ -374,7 +374,7 @@ static int ath9k_htc_add_monitor_interface(struct ath9k_htc_priv *priv)
 	 * Add an interface.
 	 */
 	memset(&hvif, 0, sizeof(struct ath9k_htc_target_vif));
-	memcpy(&hvif.myaddr, common->macaddr, ETH_ALEN);
+	ether_addr_copy(hvif.myaddr, common->macaddr);
 
 	hvif.opmode = HTC_M_MONITOR;
 	hvif.index = ffz(priv->vif_slot);
@@ -404,7 +404,7 @@ static int ath9k_htc_add_monitor_interface(struct ath9k_htc_priv *priv)
 	 */
 	memset(&tsta, 0, sizeof(struct ath9k_htc_target_sta));
 
-	memcpy(&tsta.macaddr, common->macaddr, ETH_ALEN);
+	ether_addr_copy(tsta.macaddr, common->macaddr);
 
 	tsta.is_vif_sta = 1;
 	tsta.sta_index = sta_idx;
@@ -489,15 +489,15 @@ static int ath9k_htc_add_station(struct ath9k_htc_priv *priv,
 
 	if (sta) {
 		ista = (struct ath9k_htc_sta *) sta->drv_priv;
-		memcpy(&tsta.macaddr, sta->addr, ETH_ALEN);
-		memcpy(&tsta.bssid, common->curbssid, ETH_ALEN);
+		ether_addr_copy(tsta.macaddr, sta->addr);
+		ether_addr_copy(tsta.bssid, common->curbssid);
 		ista->index = sta_idx;
 		tsta.is_vif_sta = 0;
 		maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
 				 sta->ht_cap.ampdu_factor);
 		tsta.maxampdu = cpu_to_be16(maxampdu);
 	} else {
-		memcpy(&tsta.macaddr, vif->addr, ETH_ALEN);
+		ether_addr_copy(tsta.macaddr, vif->addr);
 		tsta.is_vif_sta = 1;
 		tsta.maxampdu = cpu_to_be16(0xffff);
 	}
@@ -1048,7 +1048,7 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw,
 
 	ath9k_htc_ps_wakeup(priv);
 	memset(&hvif, 0, sizeof(struct ath9k_htc_target_vif));
-	memcpy(&hvif.myaddr, vif->addr, ETH_ALEN);
+	ether_addr_copy(hvif.myaddr, vif->addr);
 
 	switch (vif->type) {
 	case NL80211_IFTYPE_STATION:
@@ -1131,7 +1131,7 @@ static void ath9k_htc_remove_interface(struct ieee80211_hw *hw,
 	ath9k_htc_ps_wakeup(priv);
 
 	memset(&hvif, 0, sizeof(struct ath9k_htc_target_vif));
-	memcpy(&hvif.myaddr, vif->addr, ETH_ALEN);
+	ether_addr_copy(hvif.myaddr, vif->addr);
 	hvif.index = avp->index;
 	WMI_CMD_BUF(WMI_VAP_REMOVE_CMDID, &hvif);
 	if (ret) {
@@ -1493,7 +1493,7 @@ static void ath9k_htc_bss_iter(void *data, u8 *mac, struct ieee80211_vif *vif)
 	if ((vif->type == NL80211_IFTYPE_STATION) && bss_conf->assoc) {
 		common->curaid = bss_conf->aid;
 		common->last_rssi = ATH_RSSI_DUMMY_MARKER;
-		memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
+		ether_addr_copy(common->curbssid, bss_conf->bssid);
 		set_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags);
 	}
 }
@@ -1543,7 +1543,7 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
 	if (changed & BSS_CHANGED_IBSS) {
 		if (priv->ah->opmode == NL80211_IFTYPE_ADHOC) {
 			common->curaid = bss_conf->aid;
-			memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
+			ether_addr_copy(common->curbssid, bss_conf->bssid);
 			ath9k_htc_set_bssid(priv);
 		}
 	}
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath9k_htc: use ether_addr_copy() instead of memcpy()
  2015-09-22 14:24 ` [PATCH] ath9k_htc: use ether_addr_copy() instead of memcpy() Oleksij Rempel
@ 2015-09-23 13:16   ` Sujith Manoharan
  2015-09-23 16:42     ` Oleksij Rempel
  0 siblings, 1 reply; 4+ messages in thread
From: Sujith Manoharan @ 2015-09-23 13:16 UTC (permalink / raw)
  To: Oleksij Rempel; +Cc: kvalo, ath9k-devel, linux-wireless

Oleksij Rempel wrote:
> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
> ---
>  drivers/net/wireless/ath/ath9k/htc_drv_init.c |  2 +-
>  drivers/net/wireless/ath/ath9k/htc_drv_main.c | 24 ++++++++++++------------
>  2 files changed, 13 insertions(+), 13 deletions(-)

Both the arguments for ether_addr_copy() need to be
aligned. Is this the case for all the replacements in
this patch ?

Sujith

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath9k_htc: use ether_addr_copy() instead of memcpy()
  2015-09-23 13:16   ` Sujith Manoharan
@ 2015-09-23 16:42     ` Oleksij Rempel
  2015-09-29  8:22       ` Kalle Valo
  0 siblings, 1 reply; 4+ messages in thread
From: Oleksij Rempel @ 2015-09-23 16:42 UTC (permalink / raw)
  To: Sujith Manoharan; +Cc: kvalo, ath9k-devel, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 567 bytes --]

Am 23.09.2015 um 15:16 schrieb Sujith Manoharan:
> Oleksij Rempel wrote:
>> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
>> ---
>>  drivers/net/wireless/ath/ath9k/htc_drv_init.c |  2 +-
>>  drivers/net/wireless/ath/ath9k/htc_drv_main.c | 24 ++++++++++++------------
>>  2 files changed, 13 insertions(+), 13 deletions(-)
> 
> Both the arguments for ether_addr_copy() need to be
> aligned. Is this the case for all the replacements in
> this patch ?
> 
> Sujith
> 

hm... you right. Kvalo, please drop this patch.

-- 
Regards,
Oleksij


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath9k_htc: use ether_addr_copy() instead of memcpy()
  2015-09-23 16:42     ` Oleksij Rempel
@ 2015-09-29  8:22       ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2015-09-29  8:22 UTC (permalink / raw)
  To: Oleksij Rempel; +Cc: Sujith Manoharan, ath9k-devel, linux-wireless

Oleksij Rempel <linux@rempel-privat.de> writes:

> Am 23.09.2015 um 15:16 schrieb Sujith Manoharan:
>> Oleksij Rempel wrote:
>>> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
>>> ---
>>>  drivers/net/wireless/ath/ath9k/htc_drv_init.c |  2 +-
>>>  drivers/net/wireless/ath/ath9k/htc_drv_main.c | 24 ++++++++++++------------
>>>  2 files changed, 13 insertions(+), 13 deletions(-)
>> 
>> Both the arguments for ether_addr_copy() need to be
>> aligned. Is this the case for all the replacements in
>> this patch ?
>
> hm... you right. Kvalo, please drop this patch.

Dropped.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-29  8:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87lhbylifx.fsf@kamboji.qca.qualcomm.com>
2015-09-22 14:24 ` [PATCH] ath9k_htc: use ether_addr_copy() instead of memcpy() Oleksij Rempel
2015-09-23 13:16   ` Sujith Manoharan
2015-09-23 16:42     ` Oleksij Rempel
2015-09-29  8:22       ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.