iwlwifi: pcie: use seq_file for tx_queue debugfs file
authorJohannes Berg <johannes.berg@intel.com>
Fri, 17 Apr 2020 10:21:38 +0000 (13:21 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 24 Apr 2020 13:38:09 +0000 (16:38 +0300)
commitdf67a1bea0378488a0454f2be2609349fda86727
treef316ceaad2c0a5bb508d0baa94df6dc1d6f15bb4
parent250380c9b8e5a1d893a8012a33667343dc75e17e
iwlwifi: pcie: use seq_file for tx_queue debugfs file

On newer hardware, the tx_queue debugfs file would need to
allocate 37.5kib data since there are 512 queues, which is
too much. Rather than resorting to kludges like kvmalloc(),
use the seq_file API to print out the data.

While at it, also fix a NULL pointer dereference here, the
txq pointer from trans_pcie->txqs[] may be NULL if that
queue hasn't been allocated.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200417131727.491cf8224c49.I7f154d81e5becef3b5ff22d7c6e36170bde0d7d5@changeid
drivers/net/wireless/intel/iwlwifi/pcie/trans.c