lkml.org 
[lkml]   [2018]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 269/496] iwlwifi: mvm: make sure internal station has a valid id
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Avraham Stern <avraham.stern@intel.com>

    [ Upstream commit df65c8d1728adee2a52c30287d33da83a8c87480 ]

    If the driver failed to resume from D3, it is possible that it has
    no valid aux station. In such case, fw restart will end up in sending
    station related commands with an invalid station id, which will
    result in an assert.

    Fix this by allocating a new station id for the aux station if it
    does not have a valid id even in the case of fw restart.

    Signed-off-by: Avraham Stern <avraham.stern@intel.com>
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
    +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
    @@ -1679,7 +1679,8 @@ int iwl_mvm_allocate_int_sta(struct iwl_
    u32 qmask, enum nl80211_iftype iftype,
    enum iwl_sta_type type)
    {
    - if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) {
    + if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status) ||
    + sta->sta_id == IWL_MVM_INVALID_STA) {
    sta->sta_id = iwl_mvm_find_free_sta_id(mvm, iftype);
    if (WARN_ON_ONCE(sta->sta_id == IWL_MVM_INVALID_STA))
    return -ENOSPC;

    \
     
     \ /
      Last update: 2018-05-28 15:03    [W:4.016 / U:0.052 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site