iwlwifi: mvm: fix RFH config command with >=10 CPUs
authorJohannes Berg <johannes.berg@intel.com>
Tue, 11 Dec 2018 20:20:43 +0000 (21:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2019 20:33:11 +0000 (22:33 +0200)
commitb4410c7d731db051926bb83e8d62fc0b02241c3d
treed4dd632d7ef7aca875cdaf192f2b7eb9727487d5
parent080e00c8f6f96dc6837e2ad220c5d7032fa00788
iwlwifi: mvm: fix RFH config command with >=10 CPUs

[ Upstream commit dbf592f3d14fb7d532cb7c820b1065cf33e02aaa ]

If we have >=10 (logical) CPUs, our command size exceeds the
internal buffer size and the command fails; fix that by using
IWL_HCMD_DFL_NOCOPY for the command that's allocated anyway.

While at it, also fix the leak of cmd, and use struct_size()
to calculate its size.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Fixes: 8edbfaa19835 ("iwlwifi: mvm: configure multi RX queue")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/mvm/fw.c