Message ID | 1344871392-6642-1-git-send-email-mohammed@qca.qualcomm.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Mohammed Shafi Shajakhan wrote: > - if (priv->nvifs >= ATH9K_HTC_MAX_VIF) { > - mutex_unlock(&priv->mutex); > - return -ENOBUFS; > - } > - > - if (priv->num_ibss_vif || > - (priv->nvifs && vif->type == NL80211_IFTYPE_ADHOC)) { > - ath_err(common, "IBSS coexistence with other modes is not allowed\n"); > - mutex_unlock(&priv->mutex); > - return -ENOBUFS; > - } > - > - if (((vif->type == NL80211_IFTYPE_AP) || > - (vif->type == NL80211_IFTYPE_ADHOC)) && > - ((priv->num_ap_vif + priv->num_ibss_vif) >= ATH9K_HTC_MAX_BCN_VIF)) { > - ath_err(common, "Max. number of beaconing interfaces reached\n"); > - mutex_unlock(&priv->mutex); > - return -ENOBUFS; > - } > - Looks okay. Sujith -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Monday 13 August 2012 09:08 PM, Sujith Manoharan wrote: > Mohammed Shafi Shajakhan wrote: >> - if (priv->nvifs >= ATH9K_HTC_MAX_VIF) { >> - mutex_unlock(&priv->mutex); >> - return -ENOBUFS; >> - } >> - >> - if (priv->num_ibss_vif || >> - (priv->nvifs && vif->type == NL80211_IFTYPE_ADHOC)) { >> - ath_err(common, "IBSS coexistence with other modes is not allowed\n"); >> - mutex_unlock(&priv->mutex); >> - return -ENOBUFS; >> - } >> - >> - if (((vif->type == NL80211_IFTYPE_AP) || >> - (vif->type == NL80211_IFTYPE_ADHOC)) && >> - ((priv->num_ap_vif + priv->num_ibss_vif) >= ATH9K_HTC_MAX_BCN_VIF)) { >> - ath_err(common, "Max. number of beaconing interfaces reached\n"); >> - mutex_unlock(&priv->mutex); >> - return -ENOBUFS; >> - } >> - > > Looks okay. thanks for the review! > > Sujith >
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index c785129..a37ae41 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c @@ -1038,26 +1038,6 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw, mutex_lock(&priv->mutex); - if (priv->nvifs >= ATH9K_HTC_MAX_VIF) { - mutex_unlock(&priv->mutex); - return -ENOBUFS; - } - - if (priv->num_ibss_vif || - (priv->nvifs && vif->type == NL80211_IFTYPE_ADHOC)) { - ath_err(common, "IBSS coexistence with other modes is not allowed\n"); - mutex_unlock(&priv->mutex); - return -ENOBUFS; - } - - if (((vif->type == NL80211_IFTYPE_AP) || - (vif->type == NL80211_IFTYPE_ADHOC)) && - ((priv->num_ap_vif + priv->num_ibss_vif) >= ATH9K_HTC_MAX_BCN_VIF)) { - ath_err(common, "Max. number of beaconing interfaces reached\n"); - mutex_unlock(&priv->mutex); - return -ENOBUFS; - } - ath9k_htc_ps_wakeup(priv); memset(&hvif, 0, sizeof(struct ath9k_htc_target_vif)); memcpy(&hvif.myaddr, vif->addr, ETH_ALEN);