diff options
author | Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> | 2013-02-22 20:19:55 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-03-05 09:41:53 +0200 |
commit | 0db96de6258ca3851c95c7c4349b7188ac524891 (patch) | |
tree | 139448a3981fb48fd0da55817dc667145d38e02c | |
parent | b53cf458ea20dd7f5e32611366f63728e40c9021 (diff) | |
download | op-kernel-dev-0db96de6258ca3851c95c7c4349b7188ac524891.zip op-kernel-dev-0db96de6258ca3851c95c7c4349b7188ac524891.tar.gz |
ath6kl: Cosmetic change in checking for free vif slot
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>
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 752ffc4..ad79880 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -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; } |