ath9k_htc: Remove interface combination specific checks
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Mon, 8 Oct 2012 16:00:53 +0000 (21:30 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 29 Oct 2012 19:18:51 +0000 (15:18 -0400)
Once the driver advertizes interface combination logic
based on its firmware/hardware limitation, cfg80211
takes care of all the necessary logic such as maximum
beaconing vifs, standlone interface etc.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/htc_drv_main.c

index ca78e33ca23ec1393dd6fa9b109a7443cf865cf8..66f6a74c508efe40dd899e6e2e9b2decbc616368 100644 (file)
@@ -1036,26 +1036,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);