aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/htc_drv_main.c
diff options
context:
space:
mode:
authorSujith Manoharan <Sujith.Manoharan@atheros.com>2011-02-20 21:19:23 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-02-23 16:25:27 -0500
commitda8d9d937b34cf5d82e01420d015d8ee14f76467 (patch)
treedea8909be0c95012c751a3201471c09a8353e3cb /drivers/net/wireless/ath/ath9k/htc_drv_main.c
parent0df8359a88f40ab3b0d38156a5f41ee856178aa3 (diff)
ath9k_htc: Allow AP interface to be created
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/htc_drv_main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 39074fc72d6..51a8c51510e 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1204,6 +1204,14 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw,
1204 return -ENOBUFS; 1204 return -ENOBUFS;
1205 } 1205 }
1206 1206
1207 if (((vif->type == NL80211_IFTYPE_AP) ||
1208 (vif->type == NL80211_IFTYPE_ADHOC)) &&
1209 ((priv->num_ap_vif + priv->num_ibss_vif) >= ATH9K_HTC_MAX_BCN_VIF)) {
1210 ath_err(common, "Max. number of beaconing interfaces reached\n");
1211 mutex_unlock(&priv->mutex);
1212 return -ENOBUFS;
1213 }
1214
1207 ath9k_htc_ps_wakeup(priv); 1215 ath9k_htc_ps_wakeup(priv);
1208 memset(&hvif, 0, sizeof(struct ath9k_htc_target_vif)); 1216 memset(&hvif, 0, sizeof(struct ath9k_htc_target_vif));
1209 memcpy(&hvif.myaddr, vif->addr, ETH_ALEN); 1217 memcpy(&hvif.myaddr, vif->addr, ETH_ALEN);
@@ -1215,6 +1223,9 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw,
1215 case NL80211_IFTYPE_ADHOC: 1223 case NL80211_IFTYPE_ADHOC:
1216 hvif.opmode = cpu_to_be32(HTC_M_IBSS); 1224 hvif.opmode = cpu_to_be32(HTC_M_IBSS);
1217 break; 1225 break;
1226 case NL80211_IFTYPE_AP:
1227 hvif.opmode = cpu_to_be32(HTC_M_HOSTAP);
1228 break;
1218 default: 1229 default:
1219 ath_err(common, 1230 ath_err(common,
1220 "Interface type %d not yet supported\n", vif->type); 1231 "Interface type %d not yet supported\n", vif->type);