]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/ath/ath10k/core.c
ath10k: fix station count enforcement
[karo-tx-linux.git] / drivers / net / wireless / ath / ath10k / core.c
index f660553c6c483f2564a536a02aa5da05b79ee885..7762061a194458b4982326d7edaea90700a57d8b 100644 (file)
@@ -799,6 +799,17 @@ static void ath10k_core_restart(struct work_struct *work)
        mutex_unlock(&ar->conf_mutex);
 }
 
+static void ath10k_core_init_max_sta_count(struct ath10k *ar)
+{
+       if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) {
+               ar->max_num_peers = TARGET_10X_NUM_PEERS;
+               ar->max_num_stations = TARGET_10X_NUM_STATIONS;
+       } else {
+               ar->max_num_peers = TARGET_NUM_PEERS;
+               ar->max_num_stations = TARGET_NUM_STATIONS;
+       }
+}
+
 int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode)
 {
        int status;
@@ -1035,6 +1046,8 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
                return ret;
        }
 
+       ath10k_core_init_max_sta_count(ar);
+
        mutex_lock(&ar->conf_mutex);
 
        ret = ath10k_core_start(ar, ATH10K_FIRMWARE_MODE_NORMAL);