--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
- * We would need to operate the HW in ad-hoc mode to allow TSF updates
- * for the IBSS, but this breaks with additional AP or STA interfaces
- * at the moment. */
- * We would need to operate the HW in ad-hoc mode to allow TSF updates
- * for the IBSS, but this breaks with additional AP or STA interfaces
- * at the moment. */
-+ if (sc->num_adhoc_vifs && vif->type == NL80211_IFTYPE_ADHOC) {
- ATH5K_ERR(sc, "Only one single ad-hoc interface is allowed.\n");
++ if (ah->num_adhoc_vifs && vif->type == NL80211_IFTYPE_ADHOC) {
+ ATH5K_ERR(ah, "Only one single ad-hoc interface is allowed.\n");
-- if ((sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) ||
-+ if ((sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs + sc->num_adhoc_vifs > 1) ||
- sc->opmode == NL80211_IFTYPE_MESH_POINT) {
+- if ((ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs > 1) ||
++ if ((ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs + ah->num_adhoc_vifs > 1) ||
+ ah->opmode == NL80211_IFTYPE_MESH_POINT) {
- intval = sc->bintval & AR5K_BEACON_PERIOD;
-- if (sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) {
-+ if (sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs + sc->num_adhoc_vifs > 1) {
+ intval = ah->bintval & AR5K_BEACON_PERIOD;
+- if (ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs > 1) {
++ if (ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs + ah->num_adhoc_vifs > 1) {
- ATH5K_WARN(sc, "intval %u is too low, min 15\n",
+ ATH5K_WARN(ah, "intval %u is too low, min 15\n",