From: <Ajay.Kathat@microchip.com>
To: <linux-wireless@vger.kernel.org>
Cc: <devel@driverdev.osuosl.org>, <gregkh@linuxfoundation.org>,
<Adham.Abozaeid@microchip.com>, <johannes@sipsolutions.net>,
<Ajay.Kathat@microchip.com>
Subject: [PATCH 6/8] staging: wilc1000: remove use of 'src_addr' element in 'wilc_vif' struct
Date: Wed, 26 Jun 2019 12:41:01 +0000 [thread overview]
Message-ID: <1561552810-8933-7-git-send-email-ajay.kathat@microchip.com> (raw)
In-Reply-To: <1561552810-8933-1-git-send-email-ajay.kathat@microchip.com>
From: Ajay Singh <ajay.kathat@microchip.com>
Remove use of 'src_addr' element in wilc_vif, as the same information
already copied to net_device->dev_addr.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
drivers/staging/wilc1000/wilc_netdev.c | 3 +--
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +-
drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 -
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_netdev.c b/drivers/staging/wilc1000/wilc_netdev.c
index 0af60b2..565e2b5 100644
--- a/drivers/staging/wilc1000/wilc_netdev.c
+++ b/drivers/staging/wilc1000/wilc_netdev.c
@@ -638,8 +638,7 @@ static int wilc_mac_open(struct net_device *ndev)
wilc_get_mac_address(vif, mac_add);
netdev_dbg(ndev, "Mac address: %pM\n", mac_add);
- memcpy(vif->src_addr, mac_add, ETH_ALEN);
- memcpy(ndev->dev_addr, vif->src_addr, ETH_ALEN);
+ ether_addr_copy(ndev->dev_addr, mac_add);
if (!is_valid_ether_addr(ndev->dev_addr)) {
netdev_err(ndev, "Wrong MAC address\n");
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 1580909..d72fdd3 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1499,7 +1499,7 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev,
if (ret != 0)
netdev_err(dev, "Error in setting channel\n");
- wilc_wlan_set_bssid(dev, vif->src_addr, WILC_AP_MODE);
+ wilc_wlan_set_bssid(dev, dev->dev_addr, WILC_AP_MODE);
wilc_set_power_mgmt(vif, 0, 0);
return wilc_add_beacon(vif, settings->beacon_interval,
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
index d5d830d..e28c8de 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
@@ -198,7 +198,6 @@ struct wilc_vif {
struct frame_reg frame_reg[NUM_REG_FRAME];
struct net_device_stats netstats;
struct wilc *wilc;
- u8 src_addr[ETH_ALEN];
u8 bssid[ETH_ALEN];
struct host_if_drv *hif_drv;
struct net_device *ndev;
--
2.7.4
next prev parent reply other threads:[~2019-06-26 12:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 12:40 [PATCH 0/8] staging: wilc1000: dynamically add/delete interfaces & cleanup fixes Ajay.Kathat
2019-06-26 12:40 ` [PATCH 1/8] staging: wilc1000: handle p2p operations in caller context Ajay.Kathat
2019-06-26 12:40 ` [PATCH 2/8] staging: wilc1000: fix error path cleanup in wilc_wlan_initialize() Ajay.Kathat
2019-06-26 12:40 ` [PATCH 3/8] staging: wilc1000: added support to dynamically add/remove interfaces Ajay.Kathat
2019-06-26 12:40 ` [PATCH 4/8] staging: wilc1000: remove use of driver_handler_id & ifc_id Ajay.Kathat
2019-06-26 12:40 ` [PATCH 5/8] staging: wilc1000: remove unnecessary loop to traverse vif interfaces Ajay.Kathat
2019-06-26 12:41 ` Ajay.Kathat [this message]
2019-06-26 12:41 ` [PATCH 7/8] staging: wilc1000: remove extra argument passing to wilc_send_config_pkt() Ajay.Kathat
2019-06-26 12:41 ` [PATCH 8/8] staging: wilc1000: rename 'host_interface' source and header Ajay.Kathat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1561552810-8933-7-git-send-email-ajay.kathat@microchip.com \
--to=ajay.kathat@microchip.com \
--cc=Adham.Abozaeid@microchip.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox