<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/wireless/virtual, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>wifi: mac80211_hwsim: ignore non-generic netlink releases</title>
<updated>2026-11-10T09:18:15+00:00</updated>
<author>
<name>Zhao Li</name>
<email>enderaoelyther@gmail.com</email>
</author>
<published>2026-10-28T14:17:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=989f47c56e48d442d79497a25ed946d029c4dc53'/>
<id>989f47c56e48d442d79497a25ed946d029c4dc53</id>
<content type='text'>
Closing an unrelated netlink socket can remove mac80211_hwsim radios or
clear the active wmediumd registration when its port ID matches a generic
netlink socket.

mac80211_hwsim_netlink_notify() handles every NETLINK_URELEASE event,
but netlink port IDs are scoped by protocol. The notifier therefore treats
a release from another protocol as a MAC80211_HWSIM socket release.

Ignore release notifications unless they come from NETLINK_GENERIC.

LLM assistance was used to find the bug and review.

Fixes: 7882513bacb1 ("mac80211_hwsim driver support userspace frame tx/rx")
Fixes: e9ed49bf4c2c ("mac80211-hwsim: Add support for HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE")
Cc: stable@vger.kernel.org
Signed-off-by: Zhao Li &lt;enderaoelyther@gmail.com&gt;
Link: https://patch.msgid.link/20261028141751.6728-2-enderaoelyther@gmail.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closing an unrelated netlink socket can remove mac80211_hwsim radios or
clear the active wmediumd registration when its port ID matches a generic
netlink socket.

mac80211_hwsim_netlink_notify() handles every NETLINK_URELEASE event,
but netlink port IDs are scoped by protocol. The notifier therefore treats
a release from another protocol as a MAC80211_HWSIM socket release.

Ignore release notifications unless they come from NETLINK_GENERIC.

LLM assistance was used to find the bug and review.

Fixes: 7882513bacb1 ("mac80211_hwsim driver support userspace frame tx/rx")
Fixes: e9ed49bf4c2c ("mac80211-hwsim: Add support for HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE")
Cc: stable@vger.kernel.org
Signed-off-by: Zhao Li &lt;enderaoelyther@gmail.com&gt;
Link: https://patch.msgid.link/20261028141751.6728-2-enderaoelyther@gmail.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: mac80211_hwsim: use CLOCK_BOOTTIME for the beacon timer</title>
<updated>2026-11-10T09:02:49+00:00</updated>
<author>
<name>Loïc Kassel</name>
<email>loic.kassel@gmail.com</email>
</author>
<published>2026-10-23T17:21:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0da2be70425b21acf6e11bcf02f8a10fd55e85b0'/>
<id>0da2be70425b21acf6e11bcf02f8a10fd55e85b0</id>
<content type='text'>
The simulated TSF is based on boottime, and the beacon timer is re-armed
with an absolute expiry derived from the TSF through
mac80211_hwsim_tsf_to_boottime(). The timer itself is however still set
up with CLOCK_MONOTONIC.

Boottime keeps running while the system is suspended, monotonic does
not. After the host has been suspended once, every beacon is therefore
scheduled too late by the total time spent in suspend, and APs
practically stop sending beacons.

Set the beacon timer up with CLOCK_BOOTTIME so that it is consistent
with the TSF.

Fixes: 933f5bec98a1 ("wifi: mac80211_hwsim: register beacon timer by calculating TBTT")
Closes: https://lore.kernel.org/linux-wireless/CAAzpgGdksHZjx4jc20zqnAG_PQ2e1ggANQjt2eiycUiWc+vPHg@mail.gmail.com/
Signed-off-by: Loïc Kassel &lt;loic.kassel@gmail.com&gt;
Link: https://patch.msgid.link/20261023-hwsim-beacon-clock-v1-1-9b3f3ffc099b@gmail.com
[remove useless commit message fluff]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The simulated TSF is based on boottime, and the beacon timer is re-armed
with an absolute expiry derived from the TSF through
mac80211_hwsim_tsf_to_boottime(). The timer itself is however still set
up with CLOCK_MONOTONIC.

Boottime keeps running while the system is suspended, monotonic does
not. After the host has been suspended once, every beacon is therefore
scheduled too late by the total time spent in suspend, and APs
practically stop sending beacons.

Set the beacon timer up with CLOCK_BOOTTIME so that it is consistent
with the TSF.

Fixes: 933f5bec98a1 ("wifi: mac80211_hwsim: register beacon timer by calculating TBTT")
Closes: https://lore.kernel.org/linux-wireless/CAAzpgGdksHZjx4jc20zqnAG_PQ2e1ggANQjt2eiycUiWc+vPHg@mail.gmail.com/
Signed-off-by: Loïc Kassel &lt;loic.kassel@gmail.com&gt;
Link: https://patch.msgid.link/20261023-hwsim-beacon-clock-v1-1-9b3f3ffc099b@gmail.com
[remove useless commit message fluff]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: mac80211_hwsim: get wiphy_name() after registration</title>
<updated>2026-10-13T11:58:36+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2026-10-11T09:31:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=03b0588c2511dd5cf7745a194fedaadabba4b163'/>
<id>03b0588c2511dd5cf7745a194fedaadabba4b163</id>
<content type='text'>
The wiphy name registration is (or at least looks, since hwsim
is the only user and doesn't have parallel ops) currently racy.
In preparation for fixing that, grab wiphy_name() after the
new radio is registered, since registration might change it.

Link: https://patch.msgid.link/20261011113308.13b74d285682.I738d8363368771b442c3d9c683fef2c7e6c39da1@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The wiphy name registration is (or at least looks, since hwsim
is the only user and doesn't have parallel ops) currently racy.
In preparation for fixing that, grab wiphy_name() after the
new radio is registered, since registration might change it.

Link: https://patch.msgid.link/20261011113308.13b74d285682.I738d8363368771b442c3d9c683fef2c7e6c39da1@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: mac80211_hwsim: support lockless beacon updates</title>
<updated>2026-10-13T11:58:13+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2026-10-09T18:10:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3c46fb6b3c17400096e2300d9423cdf53c07390f'/>
<id>3c46fb6b3c17400096e2300d9423cdf53c07390f</id>
<content type='text'>
We just use ieee80211_beacon_get_template_ema_list() or
ieee80211_beacon_get() here to transmit the beacons, so
there's no need to implement update_beacon() and we can
just set NL80211_EXT_FEATURE_UPDATE_BEACON.

Link: https://patch.msgid.link/20261009201417.b70fda659f6a.I811ea72fc189eb20bbc07b27cfaf9ffd420a70c9@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We just use ieee80211_beacon_get_template_ema_list() or
ieee80211_beacon_get() here to transmit the beacons, so
there's no need to implement update_beacon() and we can
just set NL80211_EXT_FEATURE_UPDATE_BEACON.

Link: https://patch.msgid.link/20261009201417.b70fda659f6a.I811ea72fc189eb20bbc07b27cfaf9ffd420a70c9@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: mac80211_hwsim: call cfg80211 event with wiphy mutex</title>
<updated>2026-10-09T14:12:47+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2026-10-06T10:04:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=666a90322677f3444aa64674a5dd57e728414e07'/>
<id>666a90322677f3444aa64674a5dd57e728414e07</id>
<content type='text'>
These functions really require the wiphy mutex (though
they're not yet documented as such), call them with it.

Link: https://patch.msgid.link/20261006120655.34c6cd54cb9d.I4a45533cc3a020c472f7d90f33e854d7a89b2d3a@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These functions really require the wiphy mutex (though
they're not yet documented as such), call them with it.

Link: https://patch.msgid.link/20261006120655.34c6cd54cb9d.I4a45533cc3a020c472f7d90f33e854d7a89b2d3a@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: mac80211_hwsim: Pin module for debugfs file operations</title>
<updated>2026-10-09T14:11:01+00:00</updated>
<author>
<name>Bui Viet Dung</name>
<email>dungvn2345@gmail.com</email>
</author>
<published>2026-10-08T12:28:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=81a6e0248d8362c69636f312ae78708cad543e93'/>
<id>81a6e0248d8362c69636f312ae78708cad543e93</id>
<content type='text'>
An open debugfs file retains its file_operations pointer in the
debugfs proxy state. However, hwsim_background_cac_ops and
hwsim_simulate_incumbent_signal_fops in mac80211_hwsim_main.c have no
.owner set to THIS_MODULE.

As a result, full_proxy_open_regular() calls fops_get() which succeeds
without taking a reference to the mac80211_hwsim module. When a userspace
process opens either of these debugfs files, a subsequent module unload
(rmmod mac80211_hwsim) can succeed while the file descriptor remains open.

When the userspace process subsequently closes the descriptor,
full_proxy_release() accesses the already unmapped file_operations
structure, triggering a kernel oops in full_proxy_release():

  BUG: unable to handle page fault for address: fffffbfff84f49e7
  Oops: 0000 [#1] SMP KASAN NOPTI
  RIP: 0010:full_proxy_release+0x8e/0x140
  Call Trace:
   &lt;TASK&gt;
   __fput+0x39f/0xa60
   __x64_sys_close+0x80/0xe0
   do_syscall_64+0xc3/0x590
   entry_SYSCALL_64_after_hwframe+0x76/0x7e
   &lt;/TASK&gt;

The issue was discovered via manual code audit of mac80211_hwsim_main.c
and reproduced on a Linux 7.3-rc6 test VM with CONFIG_MAC80211_HWSIM=m.

Set .owner = THIS_MODULE on both debugfs file_operations structures in
mac80211_hwsim_main.c so that debugfs pins the module until close has
completed.

Signed-off-by: Bui Viet Dung &lt;dungvn2345@gmail.com&gt;
Link: https://patch.msgid.link/20261008122838.224835-1-dungvn2345@gmail.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An open debugfs file retains its file_operations pointer in the
debugfs proxy state. However, hwsim_background_cac_ops and
hwsim_simulate_incumbent_signal_fops in mac80211_hwsim_main.c have no
.owner set to THIS_MODULE.

As a result, full_proxy_open_regular() calls fops_get() which succeeds
without taking a reference to the mac80211_hwsim module. When a userspace
process opens either of these debugfs files, a subsequent module unload
(rmmod mac80211_hwsim) can succeed while the file descriptor remains open.

When the userspace process subsequently closes the descriptor,
full_proxy_release() accesses the already unmapped file_operations
structure, triggering a kernel oops in full_proxy_release():

  BUG: unable to handle page fault for address: fffffbfff84f49e7
  Oops: 0000 [#1] SMP KASAN NOPTI
  RIP: 0010:full_proxy_release+0x8e/0x140
  Call Trace:
   &lt;TASK&gt;
   __fput+0x39f/0xa60
   __x64_sys_close+0x80/0xe0
   do_syscall_64+0xc3/0x590
   entry_SYSCALL_64_after_hwframe+0x76/0x7e
   &lt;/TASK&gt;

The issue was discovered via manual code audit of mac80211_hwsim_main.c
and reproduced on a Linux 7.3-rc6 test VM with CONFIG_MAC80211_HWSIM=m.

Set .owner = THIS_MODULE on both debugfs file_operations structures in
mac80211_hwsim_main.c so that debugfs pins the module until close has
completed.

Signed-off-by: Bui Viet Dung &lt;dungvn2345@gmail.com&gt;
Link: https://patch.msgid.link/20261008122838.224835-1-dungvn2345@gmail.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: mac80211_hwsim: add NAN Instant Communication support</title>
<updated>2026-10-05T13:28:54+00:00</updated>
<author>
<name>Ilan Peer</name>
<email>ilan.peer@intel.com</email>
</author>
<published>2026-10-05T08:44:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=51741226b2087a261d99ce5af805246f75d14ab8'/>
<id>51741226b2087a261d99ce5af805246f75d14ab8</id>
<content type='text'>
Advertise Instant Communication (IC) support, and when it is enabled:

- Transmit the discovery beacons disregarding the role and the state,
  with the configured beacon interval and the NAN attributes set by
  user space.
- Accept beacons that carry a Service ID List or a Subscribe Service
  ID List attribute at any time, so that they are forwarded to
  mac80211.
- Process discovery beacons received during non DW slots for anchor
  master tracking and synchronization.

Assisted-by: GitHubCopilot:claude-opus-5
Signed-off-by: Ilan Peer &lt;ilan.peer@intel.com&gt;
Reviewed-by: Benjamin Berg &lt;benjamin.berg@intel.com&gt;
Signed-off-by: Miri Korenblit &lt;miriam.rachel.korenblit@intel.com&gt;
Link: https://patch.msgid.link/20261005084458.3666739-12-ilan.peer@intel.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Advertise Instant Communication (IC) support, and when it is enabled:

- Transmit the discovery beacons disregarding the role and the state,
  with the configured beacon interval and the NAN attributes set by
  user space.
- Accept beacons that carry a Service ID List or a Subscribe Service
  ID List attribute at any time, so that they are forwarded to
  mac80211.
- Process discovery beacons received during non DW slots for anchor
  master tracking and synchronization.

Assisted-by: GitHubCopilot:claude-opus-5
Signed-off-by: Ilan Peer &lt;ilan.peer@intel.com&gt;
Reviewed-by: Benjamin Berg &lt;benjamin.berg@intel.com&gt;
Signed-off-by: Miri Korenblit &lt;miriam.rachel.korenblit@intel.com&gt;
Link: https://patch.msgid.link/20261005084458.3666739-12-ilan.peer@intel.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: mac80211_hwsim: nan: Handle more of the NAN configuration</title>
<updated>2026-10-05T13:28:54+00:00</updated>
<author>
<name>Ilan Peer</name>
<email>ilan.peer@intel.com</email>
</author>
<published>2026-10-05T08:44:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=24356be4c609155422d11d652880b7a1613a3cb0'/>
<id>24356be4c609155422d11d652880b7a1613a3cb0</id>
<content type='text'>
- Use the discovery beacon interval configured by user space instead of
  always using hardcoded 100 TUs.
- Append the NAN attributes set by user space to the locally generated
  ones in the discovery beacons.

Assisted-by: GitHubCopilot:claude-opus-5
Signed-off-by: Ilan Peer &lt;ilan.peer@intel.com&gt;
Link: https://patch.msgid.link/20261005084458.3666739-11-ilan.peer@intel.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Use the discovery beacon interval configured by user space instead of
  always using hardcoded 100 TUs.
- Append the NAN attributes set by user space to the locally generated
  ones in the discovery beacons.

Assisted-by: GitHubCopilot:claude-opus-5
Signed-off-by: Ilan Peer &lt;ilan.peer@intel.com&gt;
Link: https://patch.msgid.link/20261005084458.3666739-11-ilan.peer@intel.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: mac80211_hwsim: nan: prepare for more configurable NAN settings</title>
<updated>2026-10-05T13:28:53+00:00</updated>
<author>
<name>Ilan Peer</name>
<email>ilan.peer@intel.com</email>
</author>
<published>2026-10-05T08:44:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1bcfad2871a578b46549ad0d8ffbc8672dd615c5'/>
<id>1bcfad2871a578b46549ad0d8ffbc8672dd615c5</id>
<content type='text'>
In preparation for handling more of the NAN configuration setting, do
some refactoring and cleanup:

 - Extract mac80211_hwsim_nan_set_config() and call it both when NAN is
   started and when the configuration changes.
 - Add NAN_BEACON_ELEM_LEN instead of the hardcoded 27.

Assisted-by: GitHubCopilot:claude-opus-5
Signed-off-by: Ilan Peer &lt;ilan.peer@intel.com&gt;
Link: https://patch.msgid.link/20261005084458.3666739-10-ilan.peer@intel.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In preparation for handling more of the NAN configuration setting, do
some refactoring and cleanup:

 - Extract mac80211_hwsim_nan_set_config() and call it both when NAN is
   started and when the configuration changes.
 - Add NAN_BEACON_ELEM_LEN instead of the hardcoded 27.

Assisted-by: GitHubCopilot:claude-opus-5
Signed-off-by: Ilan Peer &lt;ilan.peer@intel.com&gt;
Link: https://patch.msgid.link/20261005084458.3666739-10-ilan.peer@intel.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: mac80211_hwsim: nan: use ieee80211_is_nan_beacon() helper</title>
<updated>2026-10-05T13:28:53+00:00</updated>
<author>
<name>Ilan Peer</name>
<email>ilan.peer@intel.com</email>
</author>
<published>2026-10-05T08:44:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=37c7e192b3c5529e7852ea906f6c3d56ce475116'/>
<id>37c7e192b3c5529e7852ea906f6c3d56ce475116</id>
<content type='text'>
Use the new ieee80211_is_nan_beacon() helper to identify NAN beacons
instead of open-coding the cluster ID and vendor element checks.

Assisted-by: GitHubCopilot:claude-opus-5
Signed-off-by: Ilan Peer &lt;ilan.peer@intel.com&gt;
Signed-off-by: Miri Korenblit &lt;miriam.rachel.korenblit@intel.com&gt;
Link: https://patch.msgid.link/20261005084458.3666739-9-ilan.peer@intel.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the new ieee80211_is_nan_beacon() helper to identify NAN beacons
instead of open-coding the cluster ID and vendor element checks.

Assisted-by: GitHubCopilot:claude-opus-5
Signed-off-by: Ilan Peer &lt;ilan.peer@intel.com&gt;
Signed-off-by: Miri Korenblit &lt;miriam.rachel.korenblit@intel.com&gt;
Link: https://patch.msgid.link/20261005084458.3666739-9-ilan.peer@intel.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
