From: kernel test robot <lkp@intel.com>
To: JB Tsai <jb.tsai@mediatek.com>, nbd@nbd.name, lorenzo@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, linux-wireless@vger.kernel.org,
linux-mediatek@lists.infradead.org, Sean.Wang@mediatek.com,
James-LY.Huang@mediatek.com, jb.tsai@mediatek.com
Subject: Re: [PATCH 7/9] wifi: mt76: mt7925: inject the deauth for an aging-timeout SAP event
Date: Fri, 6 Nov 2026 08:34:01 +0800 [thread overview]
Message-ID: <202611060815.93tauu28-lkp@intel.com> (raw)
In-Reply-To: <20261104092344.1932406-7-jb.tsai@mediatek.com>
Hi JB,
kernel test robot noticed the following build warnings:
[auto build test WARNING on wireless-next/main]
[also build test WARNING on linus/master v7.4-rc1 next-20261105]
[cannot apply to wireless/main]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/JB-Tsai/wifi-mt76-mt7925-bound-P2P-off-channel-mgmt-TX-lifetime/20261104-172337
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link: https://lore.kernel.org/r/20261104092344.1932406-7-jb.tsai%40mediatek.com
patch subject: [PATCH 7/9] wifi: mt76: mt7925: inject the deauth for an aging-timeout SAP event
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20261106/202611060815.93tauu28-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261106/202611060815.93tauu28-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611060815.93tauu28-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/wireless/mediatek/mt76/mt7925/p2p.c: In function 'mt7925_mcu_sap_aging_timeout':
>> drivers/net/wireless/mediatek/mt76/mt7925/p2p.c:483:9: warning: alignment 1 of 'struct <anonymous>' is less than 2 [-Wpacked-not-aligned]
483 | } __packed deauth = {};
| ^
vim +483 drivers/net/wireless/mediatek/mt76/mt7925/p2p.c
468
469 /* FW reported that a peer of our AP/GO aged out (no traffic/no ack for the FW
470 * inactivity period); the expected reaction is a deauth with
471 * REASON_CODE_DISASSOC_INACTIVITY. Here the AP MLME lives in
472 * wpa_supplicant (softmac, device_ap_sme=0), so instead of tearing the
473 * STA down in the driver we synthesize the deauth frame the GO would
474 * have received from the GC and hand it to userspace via
475 * NL80211_CMD_FRAME.
476 */
477 static void
478 mt7925_mcu_sap_aging_timeout(struct mt792x_dev *dev, u16 wlan_idx)
479 {
480 struct {
481 struct ieee80211_hdr_3addr hdr;
482 __le16 reason_code;
> 483 } __packed deauth = {};
484 u8 peer[ETH_ALEN], own[ETH_ALEN], bssid[ETH_ALEN];
485 struct ieee80211_chanctx_conf *ctx;
486 struct mt792x_bss_conf *mconf;
487 struct mt792x_link_sta *mlink;
488 struct ieee80211_vif *vif;
489 struct ieee80211_sta *sta;
490 struct mt792x_vif *mvif;
491 struct mt792x_sta *msta;
492 struct mt76_wcid *wcid;
493 struct wireless_dev *wdev;
494 int freq = 0;
495 u8 link_id;
496
497 rcu_read_lock();
498
499 wcid = mt76_wcid_ptr(dev, wlan_idx);
500 if (!wcid || !wcid->sta)
501 goto unlock;
502
503 mlink = container_of(wcid, struct mt792x_link_sta, wcid);
504 msta = mlink->sta;
505 if (!msta || !msta->vif)
506 goto unlock;
507
508 vif = container_of((void *)msta->vif, struct ieee80211_vif, drv_priv);
509 if (vif->type != NL80211_IFTYPE_AP &&
510 vif->type != NL80211_IFTYPE_P2P_GO)
511 goto unlock;
512
513 mvif = (struct mt792x_vif *)vif->drv_priv;
514 sta = container_of((void *)msta, struct ieee80211_sta, drv_priv);
515 link_id = wcid->link_id;
516
517 ether_addr_copy(peer, sta->addr);
518 ether_addr_copy(own, vif->addr);
519 ether_addr_copy(bssid, vif->bss_conf.bssid);
520 mconf = &mvif->bss_conf;
521
522 if (ieee80211_vif_is_mld(vif) && link_id < IEEE80211_LINK_UNSPECIFIED) {
523 struct ieee80211_link_sta *link_sta;
524 struct ieee80211_bss_conf *link_conf;
525 struct mt792x_bss_conf *link_mconf;
526
527 link_sta = rcu_dereference(sta->link[link_id]);
528 if (link_sta)
529 ether_addr_copy(peer, link_sta->addr);
530
531 link_conf = rcu_dereference(vif->link_conf[link_id]);
532 if (link_conf) {
533 ether_addr_copy(own, link_conf->addr);
534 ether_addr_copy(bssid, link_conf->bssid);
535 }
536
537 link_mconf = rcu_dereference(mvif->link_conf[link_id]);
538 if (link_mconf)
539 mconf = link_mconf;
540 }
541
542 ctx = mconf->mt76.ctx;
543 if (ctx && ctx->def.chan)
544 freq = ctx->def.chan->center_freq;
545 else if (dev->mphy.chandef.chan)
546 freq = dev->mphy.chandef.chan->center_freq;
547
548 rcu_read_unlock();
549
550 deauth.hdr.frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
551 IEEE80211_STYPE_DEAUTH);
552 ether_addr_copy(deauth.hdr.addr1, own); /* DA: the GO itself */
553 ether_addr_copy(deauth.hdr.addr2, peer); /* SA: the aged-out GC */
554 ether_addr_copy(deauth.hdr.addr3, bssid);
555 deauth.reason_code = cpu_to_le16(WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY);
556
557 wdev = ieee80211_vif_to_wdev(vif);
558 if (!wdev)
559 return;
560
561 cfg80211_rx_mgmt_khz(wdev, MHZ_TO_KHZ(freq), 0, (const u8 *)&deauth,
562 sizeof(deauth), 0);
563
564 return;
565
566 unlock:
567 rcu_read_unlock();
568 }
569
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-11-06 0:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 9:23 [PATCH 1/9] wifi: mt76: mt7925: drop P2P mgmt frames received on foreign channel JB Tsai
2026-11-04 9:23 ` [PATCH 2/9] wifi: mt76: mt7925: bound P2P off-channel mgmt TX lifetime JB Tsai
2026-11-04 9:23 ` [PATCH 3/9] wifi: mt76: mt7925: give every P2P interface a BMC wcid of its own JB Tsai
2026-11-04 9:23 ` [PATCH 4/9] wifi: mt76: mt7925: harden the ROC channel-grant handshake JB Tsai
2026-11-04 9:23 ` [PATCH 5/9] wifi: mt76: mt7925: describe the real chandef in ROC requests JB Tsai
2026-11-04 9:23 ` [PATCH 6/9] wifi: mt76: mt7925: request the channel before programming a GO BSS JB Tsai
2026-11-04 9:23 ` [PATCH 7/9] wifi: mt76: mt7925: inject the deauth for an aging-timeout SAP event JB Tsai
2026-11-06 0:34 ` kernel test robot [this message]
2026-11-04 9:23 ` [PATCH 8/9] wifi: mt76: mt7925: track BSS absence and drop stale GO probe responses JB Tsai
2026-11-04 9:23 ` [PATCH 9/9] wifi: mt76: mt7925: send the common scan IEs and size the request JB Tsai
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=202611060815.93tauu28-lkp@intel.com \
--to=lkp@intel.com \
--cc=James-LY.Huang@mediatek.com \
--cc=Sean.Wang@mediatek.com \
--cc=jb.tsai@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=oe-kbuild-all@lists.linux.dev \
/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