Skip to content

Commit 60d418e

Browse files
committed
wifi: iwlwifi: mld: fix BAID validity check
Perhaps IWL_FW_CHECK() is a bit misnamed, but it just returns the value of the inner condition. Therefore, the current code skips the actual function when it has the BAID data and makes it crash later when it doesn't. Fix the logic. Fixes: d1e879e ("wifi: iwlwifi: add iwlmld sub-driver") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250420095642.9c0b84c44c3b.Ied236258854b149960eb357ec61bf3a572503fbc@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent d49437a commit 60d418e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • drivers/net/wireless/intel/iwlwifi/mld

drivers/net/wireless/intel/iwlwifi/mld/agg.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ void iwl_mld_handle_bar_frame_release_notif(struct iwl_mld *mld,
124124

125125
rcu_read_lock();
126126
baid_data = rcu_dereference(mld->fw_id_to_ba[baid]);
127-
if (!IWL_FW_CHECK(mld, !baid_data,
128-
"Got valid BAID %d but not allocated, invalid BAR release!\n",
129-
baid))
127+
if (IWL_FW_CHECK(mld, !baid_data,
128+
"Got valid BAID %d but not allocated, invalid BAR release!\n",
129+
baid))
130130
goto out_unlock;
131131

132132
if (IWL_FW_CHECK(mld, tid != baid_data->tid ||

0 commit comments

Comments
 (0)