Skip to contentSkip to conversation

ath6kl: Cosmetic change in checking for free vif slot

PATCH In review Mohammed Shafi Shajakhan 2 participants 2 messages Feb 22, 2013 – Mar 5, 2013 Atheros ATH6KL wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/5 ath6kl: Cosmetic change in checking for free vif slot

From: Mohammed Shafi Shajakhan <[email protected]>

A minor optimization is done in finding the free slot available for the new virtual interface in the firmware.

---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath6kl/cfg80211.c +2 -2
index bc21489..8e45f41 100644
@@ -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;
 			}
Signature · 1 line
1.7.9.5