ath10k: move free_vdev_map initialization
authorMichal Kazior <michal.kazior@tieto.com>
Tue, 16 Jul 2013 07:38:55 +0000 (09:38 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 30 Jul 2013 15:01:19 +0000 (18:01 +0300)
This is necessary for hw reconfiguration to work.
Since mac80211 is not calling remove_interface()
is such case we must reset free_vdev_map.

Also use a define instead of a hardcoded value for
vdev map initialization.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c

index 01c1d82f674ff9f00f968b3ff10348483f15b3a3..0e4a704516f75fe1dcde665eb5c2e7cca0681407 100644 (file)
@@ -458,8 +458,6 @@ struct ath10k *ath10k_core_create(void *hif_priv, struct device *dev,
        ar->hif.priv = hif_priv;
        ar->hif.ops = hif_ops;
 
-       ar->free_vdev_map = 0xFF; /* 8 vdevs */
-
        init_completion(&ar->scan.started);
        init_completion(&ar->scan.completed);
        init_completion(&ar->scan.on_channel);
@@ -590,6 +588,8 @@ int ath10k_core_start(struct ath10k *ar)
        if (status)
                goto err_disconnect_htc;
 
+       ar->free_vdev_map = (1 << TARGET_NUM_VDEVS) - 1;
+
        return 0;
 
 err_disconnect_htc: