iwlwifi: mvm: extend session protection on association
When we receive an association response, a significant amount
of time might have passed since we sent the corresponding
association request (mac80211 will wait up to 500ms for the TX
and then 100ms for the response after ACK was received). But
the time event is touched only when we send the assoc request,
so it might not have much time remaining, more easily causing
the (dreaded)
No beacon heard and the session protection is over already...
message.
Refactor iwl_mvm_mac_mgd_prepare_tx() and split out a new
function iwl_mvm_protect_assoc(), and call it on successful
association to extend the time event to the minimum time if
necessary.
iwlwifi: mvm: remove session protection on disassoc
If we somehow get disassociated while still waiting for a beacon
during connection, we can end up printing the
No beacon heard and the session protection is over already...
message even if we aren't really quite waiting for it anymore.
Remove the time event, if it's running, when we get disassociated
and don't need to wait for beacons anymore.
iwlwifi: mvm: fix WGDS table print in iwl_mvm_chub_update_mcc()
WGDS table index 0 means disabled, but we were erroneously checking
for < 0 to print that it is disabled. Fix that and make the print
more readable by mentioning that it's either disabled or there was an
error.
iwlwifi: rename GEO_TX_POWER_LIMIT to PER_CHAIN_LIMIT_OFFSET_CMD
When this code was implemented, there was no official FW API
description yet, so a placeholder name was used (GEO_TX_POWER_LIMIT).
But then the command became actually called
PER_CHAIN_LIMIT_OFFSET_CMD. Rename the command (and change related
comments) to PER_CHAIN_LIMIT_OFFSET_CMD to avoid confusion.
iwlwifi: mvm: d3: use internal data representation
Trying to convert from one firmware data representation to the
next version is getting tedious and error-prone, and doesn't
lend itself well to new APIs being added. Additionally, the
version 11 of the API as defined in the driver doesn't even
exist in the firmware.
Instead of converting to a newer firmware version of the data,
convert to an internal representation. This takes a bit more
space because the TKIP/AES counters etc. must be kept twice,
their representation is different and we don't know which of
the ones it is until later, but this is just a temporary use
of memory, and the code is clearer this way.
iwlwifi: mvm: don't get address of mvm->fwrt just to dereference as a pointer
The mvm->fwrt element is not a pointer, but an instance of the
structure, so we should access its elements with a dot-notation
instead of getting the address and dereferencing it as a pointer.