]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iwlwifi: mvm: support non-transmitting AP
authorSara Sharon <sara.sharon@intel.com>
Tue, 29 Jan 2019 09:53:03 +0000 (11:53 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 20 Feb 2019 18:47:57 +0000 (20:47 +0200)
Add an option to not send beacons and probe responses. This is
used for testing multiple-bssid.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/constants.h
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
drivers/net/wireless/intel/iwlwifi/mvm/tx.c

index 6a3edea3d5807ef48f99dd7d4867abc0f3a4cb45..dff14f1ec55fe7d71014f2722299a34c20d052fc 100644 (file)
 #define IWL_MVM_TCM_LOWLAT_ENABLE_THRESH       100 /* packets/10 seconds */
 #define IWL_MVM_UAPSD_NONAGG_PERIOD            5000 /* msecs */
 #define IWL_MVM_UAPSD_NOAGG_LIST_LEN           IWL_MVM_UAPSD_NOAGG_BSSIDS_NUM
+#define IWL_MVM_NON_TRANSMITTING_AP            0
 #define IWL_MVM_RS_NUM_TRY_BEFORE_ANT_TOGGLE    1
 #define IWL_MVM_RS_HT_VHT_RETRIES_PER_RATE      2
 #define IWL_MVM_RS_HT_VHT_RETRIES_PER_RATE_TW   1
index 003a20630252856f689828319e317f1842d46802..6a70dece447dd1090d3f2d6d8b71c10a8d62b264 100644 (file)
@@ -1016,6 +1016,9 @@ int iwl_mvm_mac_ctxt_send_beacon(struct iwl_mvm *mvm,
        if (WARN_ON(!beacon))
                return -EINVAL;
 
+       if (IWL_MVM_NON_TRANSMITTING_AP)
+               return 0;
+
        if (!fw_has_capa(&mvm->fw->ucode_capa,
                         IWL_UCODE_TLV_CAPA_CSA_AND_TBTT_OFFLOAD))
                return iwl_mvm_mac_ctxt_send_beacon_v6(mvm, vif, beacon);
index ac62eb8c4b36d56848f32ae9df6525427a7843a9..898bfda93029da19564d1e9022f0575804d6e922 100644 (file)
@@ -8,7 +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
+ * Copyright(c) 2018 - 2019 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
@@ -31,7 +31,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
+ * Copyright(c) 2018 - 2019 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -719,6 +719,9 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
                IEEE80211_TX_CTL_TX_OFFCHAN;
        int queue = -1;
 
+       if (IWL_MVM_NON_TRANSMITTING_AP && ieee80211_is_probe_resp(fc))
+               return -1;
+
        memcpy(&info, skb->cb, sizeof(info));
 
        if (WARN_ON_ONCE(info.flags & IEEE80211_TX_CTL_AMPDU))
@@ -1078,6 +1081,9 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,
        fc = hdr->frame_control;
        hdrlen = ieee80211_hdrlen(fc);
 
+       if (IWL_MVM_NON_TRANSMITTING_AP && ieee80211_is_probe_resp(fc))
+               return -1;
+
        if (WARN_ON_ONCE(!mvmsta))
                return -1;