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 203/496] iwlwifi: mvm: fix assert 0x2B00 on older FWs
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

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

    From: Sara Sharon <sara.sharon@intel.com>

    [ Upstream commit 63dd5d022f4766e6b05ee611124afcc7cbfbb953 ]

    We should add the multicast station before adding the
    broadcast station.

    However, in older FW, the firmware will start beaconing
    when we add the multicast station, and since the broadcast
    station is not added at this point so the transmission
    of the beacon will fail on assert 0x2b00.

    This is fixed in later firmware, so make the order
    of addition depend on the TLV.

    Fixes: 26d6c16bed53 ("iwlwifi: mvm: add multicast station")
    Signed-off-by: Sara Sharon <sara.sharon@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/mac80211.c | 45 +++++++++++++++++-----
    1 file changed, 35 insertions(+), 10 deletions(-)

    --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
    +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
    @@ -8,6 +8,7 @@
    * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
    * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
    * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
    + * Copyright(c) 2018 Intel Corporation
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of version 2 of the GNU General Public License as
    @@ -2127,15 +2128,40 @@ static int iwl_mvm_start_ap_ibss(struct
    if (ret)
    goto out_remove;

    - ret = iwl_mvm_add_mcast_sta(mvm, vif);
    - if (ret)
    - goto out_unbind;
    -
    - /* Send the bcast station. At this stage the TBTT and DTIM time events
    - * are added and applied to the scheduler */
    - ret = iwl_mvm_send_add_bcast_sta(mvm, vif);
    - if (ret)
    - goto out_rm_mcast;
    + /*
    + * This is not very nice, but the simplest:
    + * For older FWs adding the mcast sta before the bcast station may
    + * cause assert 0x2b00.
    + * This is fixed in later FW so make the order of removal depend on
    + * the TLV
    + */
    + if (fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_STA_TYPE)) {
    + ret = iwl_mvm_add_mcast_sta(mvm, vif);
    + if (ret)
    + goto out_unbind;
    + /*
    + * Send the bcast station. At this stage the TBTT and DTIM time
    + * events are added and applied to the scheduler
    + */
    + ret = iwl_mvm_send_add_bcast_sta(mvm, vif);
    + if (ret) {
    + iwl_mvm_rm_mcast_sta(mvm, vif);
    + goto out_unbind;
    + }
    + } else {
    + /*
    + * Send the bcast station. At this stage the TBTT and DTIM time
    + * events are added and applied to the scheduler
    + */
    + iwl_mvm_send_add_bcast_sta(mvm, vif);
    + if (ret)
    + goto out_unbind;
    + iwl_mvm_add_mcast_sta(mvm, vif);
    + if (ret) {
    + iwl_mvm_send_rm_bcast_sta(mvm, vif);
    + goto out_unbind;
    + }
    + }

    /* must be set before quota calculations */
    mvmvif->ap_ibss_active = true;
    @@ -2165,7 +2191,6 @@ out_quota_failed:
    iwl_mvm_power_update_mac(mvm);
    mvmvif->ap_ibss_active = false;
    iwl_mvm_send_rm_bcast_sta(mvm, vif);
    -out_rm_mcast:
    iwl_mvm_rm_mcast_sta(mvm, vif);
    out_unbind:
    iwl_mvm_binding_remove_vif(mvm, vif);

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