ath6kl: Cosmetic change in checking for free vif slot
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Fri, 22 Feb 2013 14:49:55 +0000 (20:19 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 5 Mar 2013 07:41:53 +0000 (09:41 +0200)
A minor optimization is done in finding the free slot
available for the new virtual interface in the firmware.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/cfg80211.c

index 752ffc4..ad79880 100644 (file)
@@ -402,7 +402,7 @@ static bool ath6kl_is_valid_iftype(struct ath6kl *ar, enum nl80211_iftype type,
        if (type == NL80211_IFTYPE_STATION ||
            type == NL80211_IFTYPE_AP || type == NL80211_IFTYPE_ADHOC) {
                for (i = 0; i < ar->vif_max; i++) {
-                       if ((ar->avail_idx_map >> i) & BIT(0)) {
+                       if ((ar->avail_idx_map) & BIT(i)) {
                                *if_idx = i;
                                return true;
                        }
@@ -412,7 +412,7 @@ static bool ath6kl_is_valid_iftype(struct ath6kl *ar, enum nl80211_iftype type,
        if (type == NL80211_IFTYPE_P2P_CLIENT ||
            type == NL80211_IFTYPE_P2P_GO) {
                for (i = ar->max_norm_iface; i < ar->vif_max; i++) {
-                       if ((ar->avail_idx_map >> i) & BIT(0)) {
+                       if ((ar->avail_idx_map) & BIT(i)) {
                                *if_idx = i;
                                return true;
                        }