···149149 conf->nexttbtt, conf->intval, conf->beacon_interval);150150}151151EXPORT_SYMBOL(ath9k_cmn_beacon_config_adhoc);152152+153153+/*154154+ * For multi-bss ap support beacons are either staggered evenly over N slots or155155+ * burst together. For the former arrange for the SWBA to be delivered for each156156+ * slot. Slots that are not occupied will generate nothing.157157+ */158158+void ath9k_cmn_beacon_config_ap(struct ath_hw *ah,159159+ struct ath_beacon_config *conf,160160+ unsigned int bc_buf)161161+{162162+ struct ath_common *common = ath9k_hw_common(ah);163163+164164+ /* NB: the beacon interval is kept internally in TU's */165165+ conf->intval = TU_TO_USEC(conf->beacon_interval);166166+ conf->intval /= bc_buf;167167+ conf->nexttbtt = ath9k_get_next_tbtt(ah, ath9k_hw_gettsf64(ah),168168+ conf->beacon_interval);169169+170170+ if (conf->enable_beacon)171171+ ah->imask |= ATH9K_INT_SWBA;172172+ else173173+ ah->imask &= ~ATH9K_INT_SWBA;174174+175175+ ath_dbg(common, BEACON,176176+ "AP (%s) nexttbtt: %u intval: %u conf_intval: %u\n",177177+ (conf->enable_beacon) ? "Enable" : "Disable",178178+ conf->nexttbtt, conf->intval, conf->beacon_interval);179179+}180180+EXPORT_SYMBOL(ath9k_cmn_beacon_config_ap);