]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: iwlwifi: pcie: fix RB status reading
authorJohannes Berg <johannes.berg@intel.com>
Wed, 30 Aug 2023 08:31:03 +0000 (11:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:46 +0000 (15:28 +0200)
commit9fe75ad3c7e89be0a503ce804a7eb8abe05f25c2
treefe19f71859cca673f1d6a997cf8b0c6b16227721
parent3d0a7b23d688541beb15299fbc1a87881a720fd2
wifi: iwlwifi: pcie: fix RB status reading

commit 9f9797c7de18d2ec6be4ef6e0abbaea585040b39 upstream.

On newer hardware, a queue's RB status / write pointer
can be bigger than 4095 (0xFFF), so we cannot mask the
value by 0xFFF unconditionally. Since anyway that's
only necessary on older hardware, move the masking to
the helper function and apply it only for older HW.
This also moves the endian conversion in to handle it
more easily.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230830112059.7be2a3fff6f4.I94f11dee314a4f7c1941d2d223936b1fa8aa9ee4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/intel/iwlwifi/pcie/internal.h
drivers/net/wireless/intel/iwlwifi/pcie/rx.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c