diff mbox

atheros: remove redundant l2_packet_get_own_addr call

Message ID b8d2eab62f56d8ac86743b1bea86a9849e561e47.1352638027.git.baruch@tkos.co.il
State Accepted
Commit b49019dd3d3ff47f87400b84184b7347d264ed06
Headers show

Commit Message

Baruch Siach Nov. 11, 2012, 12:48 p.m. UTC
Commit deca6eff (atheros: Add new IEEE 802.11r driver_ops) added a redundant
call to l2_packet_get_own_addr. Use the information we already have in
atheros_init.

Signed-hostap: Baruch Siach <baruch@tkos.co.il>
---
 src/drivers/driver_atheros.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jouni Malinen Nov. 11, 2012, 2:08 p.m. UTC | #1
On Sun, Nov 11, 2012 at 02:48:49PM +0200, Baruch Siach wrote:
> Commit deca6eff (atheros: Add new IEEE 802.11r driver_ops) added a redundant
> call to l2_packet_get_own_addr. Use the information we already have in
> atheros_init.

Thanks, applied.
diff mbox

Patch

diff --git a/src/drivers/driver_atheros.c b/src/drivers/driver_atheros.c
index 5f2e675..1f960c0 100644
--- a/src/drivers/driver_atheros.c
+++ b/src/drivers/driver_atheros.c
@@ -976,8 +976,6 @@  static int atheros_receive_pkt(struct atheros_driver_data *drv)
 	if (drv->sock_raw == NULL)
 		return -1;
 #endif /* CONFIG_WPS || CONFIG_IEEE80211R */
-	if (l2_packet_get_own_addr(drv->sock_xmit, drv->own_addr))
-		return -1;
 	return ret;
 }
 
@@ -1656,6 +1654,7 @@  atheros_init(struct hostapd_data *hapd, struct wpa_init_params *params)
 		goto bad;
 	if (l2_packet_get_own_addr(drv->sock_xmit, params->own_addr))
 		goto bad;
+	memcpy(drv->own_addr, params->own_addr, ETH_ALEN);
 	if (params->bridge[0]) {
 		wpa_printf(MSG_DEBUG, "Configure bridge %s for EAPOL traffic.",
 			   params->bridge[0]);