ath10k: support up to 64 vdevs
authorBen Greear <greearb@candelatech.com>
Mon, 26 Sep 2016 18:56:26 +0000 (21:56 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 27 Sep 2016 12:18:33 +0000 (15:18 +0300)
The (1 << x) - 1 trick won't work when you
are trying to fill up all 64 bits, so add special
case for that.

Signed-off-by: Ben Greear <greearb@candelatech.com>
[kvalo@qca.qualcomm.com: remove the sentence about moving limits]
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c

index 98af0053d30de0efd59b17d0a393ebaf7d96f291..21ae8d663e67c614bb2c001005894e6ced16ab51 100644 (file)
@@ -1972,7 +1972,10 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
                goto err_hif_stop;
        }
 
-       ar->free_vdev_map = (1LL << ar->max_num_vdevs) - 1;
+       if (ar->max_num_vdevs >= 64)
+               ar->free_vdev_map = 0xFFFFFFFFFFFFFFFFLL;
+       else
+               ar->free_vdev_map = (1LL << ar->max_num_vdevs) - 1;
 
        INIT_LIST_HEAD(&ar->arvifs);