mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
wifi: iwlwifi: mld: nan: add availability attribute to schedule config
Add the availability attribute to the schedule config command. The firmware needs to add this attribute to schedule update frames (e.g. when ULW changed or the local schedule changed). Signed-off-by: Avraham Stern <avraham.stern@intel.com> Link: https://patch.msgid.link/20260515150751.97809376508e.Ie7f00f97992016c6bb2f4a5c9fc201ac58eed8ce@changeid Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
This commit is contained in:
parent
927c7e8473
commit
6d75bcc06a
|
|
@ -693,6 +693,14 @@ void iwl_mld_nan_vif_cfg_changed(struct iwl_mld *mld,
|
|||
break;
|
||||
case 2:
|
||||
cmd_size = sizeof(struct iwl_nan_schedule_cmd);
|
||||
|
||||
if (sched_cfg->avail_blob_len &&
|
||||
!WARN_ON(sched_cfg->avail_blob_len >
|
||||
sizeof(cmd.avail_attr.attr))) {
|
||||
cmd.avail_attr.attr_len = sched_cfg->avail_blob_len;
|
||||
memcpy(cmd.avail_attr.attr, sched_cfg->avail_blob,
|
||||
sched_cfg->avail_blob_len);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
IWL_ERR(mld, "NAN: unsupported NAN schedule cmd version %d\n",
|
||||
|
|
@ -727,6 +735,15 @@ void iwl_mld_nan_vif_cfg_changed(struct iwl_mld *mld,
|
|||
BUILD_BUG_ON(ARRAY_SIZE(sched_cfg->channels) !=
|
||||
ARRAY_SIZE(cmd.channels));
|
||||
|
||||
/*
|
||||
* mac80211 removes unused channels before adding new ones, so it may
|
||||
* update an empty schedule with an availability attribute because it
|
||||
* is going to add channels later. Since the firmware does not expect
|
||||
* an availability attribute without channels, ignore it in that case.
|
||||
*/
|
||||
if (empty_schedule)
|
||||
cmd.avail_attr.attr_len = 0;
|
||||
|
||||
/* find links we can keep (same chanctx/PHY) */
|
||||
for (i = 0; i < ARRAY_SIZE(sched_cfg->channels); i++) {
|
||||
struct ieee80211_chanctx_conf *chanctx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user