You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/07/02 08:15:00 UTC

[incubator-nuttx] branch master updated: wireless/bcm43xxx: mac address does not need to be updated in ifup

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new fe2231989b wireless/bcm43xxx: mac address does not need to be updated in ifup
fe2231989b is described below

commit fe2231989b8254fec10018f5776f1bba8cc2a678
Author: chao.an <an...@xiaomi.com>
AuthorDate: Wed Jun 29 23:17:18 2022 +0800

    wireless/bcm43xxx: mac address does not need to be updated in ifup
    
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c b/drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c
index 6a3e6bc1f4..2d0583b246 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c
@@ -645,6 +645,7 @@ void bcmf_netdev_notify_rx(FAR struct bcmf_dev_s *priv)
 static int bcmf_ifup(FAR struct net_driver_s *dev)
 {
   FAR struct bcmf_dev_s *priv = (FAR struct bcmf_dev_s *)dev->d_private;
+  struct ether_addr zmac;
   irqstate_t flags;
   uint32_t out_len;
   int ret = OK;
@@ -674,7 +675,9 @@ static int bcmf_ifup(FAR struct net_driver_s *dev)
 
   /* Set customized MAC address */
 
-  if (bcmf_board_etheraddr(&priv->bc_dev.d_mac.ether))
+  memset(&zmac, 0, sizeof(zmac));
+
+  if (memcmp(&priv->bc_dev.d_mac.ether, &zmac, sizeof(zmac)) != 0)
     {
       out_len = ETHER_ADDR_LEN;
       bcmf_cdc_iovar_request(priv, CHIP_STA_INTERFACE, true,