From: <Ajay.Kathat@microchip.com>
To: <heiko.thiery@gmail.com>
Cc: <Claudiu.Beznea@microchip.com>, <kvalo@kernel.org>,
<linux-wireless@vger.kernel.org>, <michael@walle.cc>,
<netdev@vger.kernel.org>, <Amisha.Patel@microchip.com>
Subject: Re: wilc1000 MAC address is 00:00:00:00:00:00
Date: Thu, 9 Feb 2023 19:09:39 +0000 [thread overview]
Message-ID: <d6d0da01-9314-2e00-e82b-d2d42276bbf4@microchip.com> (raw)
In-Reply-To: <CAEyMn7YnqhbmOnKQkks5OkGwuKoBPkQkfuWWJ2s_GAEY9WP4Wg@mail.gmail.com>
On 2/9/23 11:40, Heiko Thiery wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> Hi,
>
> Am Do., 9. Feb. 2023 um 18:15 Uhr schrieb <Ajay.Kathat@microchip.com>:
>>
>> Hi Heiko,
>>
>> On 2/8/23 07:24, Heiko Thiery wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> Hi,
>>>
>>> I'm using the WILC1000 wifi and with NetworkManager [1] I see issues
>>> in certain situations I see problems.
>>>
>>> I was able to reduce the problem and have now found out that the cause
>>> is that the interface has the HW MAC address is 00:00:00:00:00 after
>>> startup. Only when the interface is startup (ip link set dev wlan0
>>> up), the driver sets a "valid" address.
>>>
>>
>> IIUC network manager(NM) is trying to read the MAC address and write the
>> same back to wilc1000 module without making the wlan0 interface up. right?
>
> As far as I understand, network-manager will read the "real" HW
> address. Then it sets a random
> generated HW for scanning and after that switches back to the "real" HW address.
>
> There seems to be circumstances where the wrong HW address
> (00:00:00:00:00:00) is read and stored for
> later reset after the scanning.
>
Actually, the scan operation is allowed only after the interface is up.
Probably the address was stored before any wlan operation.
>> Not sure about the requirement but if NM has a valid MAC address to
>> assign to the wlan0 interface, it can be configured without making
>> interface up("wlan0 up"). "ip link set dev wlan0 address XX:XX:XX:XX:XX"
>> command should allow to set the mac address without making the interface
>> up.
>> Once the mac address is set, the wilc1000 will use that mac address [1]
>> instead of the one from wilc1000 NV memory until reboot. However, after
>> a reboot, if no MAC address is configured from application then wilc1000
>> will use the address from its NV memory.
>>
>>> Is this a valid behavior and shouldn't the address already be set
>>> after loading the driver?
>>>
>>
>> Only when the interface is up(ifconfig wlan0 up), driver loads the
>> firmware to wilc1000 module and after that the WID commands which allows
>> to set/get the mac address from the wilc1000 works.
>
> Is there a hard technical reason not to load the firmware and set the
> HW address when
> the driver is initialized and not only when its opened.
>
AFAIK, wilc1000 flow is designed that way to load the firmware start
when the interface is up (before wlan operation are performed).
Similarly when the interface is down it will not execute to save power.
Regards,
Ajay
prev parent reply other threads:[~2023-02-09 19:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 14:24 wilc1000 MAC address is 00:00:00:00:00:00 Heiko Thiery
2023-02-09 17:15 ` Ajay.Kathat
2023-02-09 17:48 ` Jakub Kicinski
2023-02-09 18:51 ` Ajay.Kathat
2023-02-09 21:07 ` Jakub Kicinski
2023-02-09 21:19 ` Michael Walle
2023-02-10 9:17 ` Heiko Thiery
2023-02-10 9:25 ` Kalle Valo
2023-02-10 19:12 ` Ajay.Kathat
2023-02-10 21:28 ` Dan Williams
2023-02-15 20:14 ` Johannes Berg
2023-02-23 10:44 ` Heiko Thiery
2023-02-23 21:48 ` Ajay.Kathat
2023-02-09 18:40 ` Heiko Thiery
2023-02-09 19:09 ` Ajay.Kathat [this message]
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=d6d0da01-9314-2e00-e82b-d2d42276bbf4@microchip.com \
--to=ajay.kathat@microchip.com \
--cc=Amisha.Patel@microchip.com \
--cc=Claudiu.Beznea@microchip.com \
--cc=heiko.thiery@gmail.com \
--cc=kvalo@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=michael@walle.cc \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).