void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif);
 int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif);
 void ath_beacon_return(struct ath_softc *sc, struct ath_vif *avp);
+int ath_beaconq_config(struct ath_softc *sc);
 
 /*******/
 /* ANI */
 
  *  the operating mode of the station (AP or AdHoc).  Parameters are AIFS
  *  settings and channel width min/max
 */
-static int ath_beaconq_config(struct ath_softc *sc)
+int ath_beaconq_config(struct ath_softc *sc)
 {
        struct ath_hw *ah = sc->sc_ah;
        struct ath_common *common = ath9k_hw_common(ah);
-       struct ath9k_tx_queue_info qi;
+       struct ath9k_tx_queue_info qi, qi_be;
+       int qnum;
 
        ath9k_hw_get_txq_props(ah, sc->beacon.beaconq, &qi);
        if (sc->sc_ah->opmode == NL80211_IFTYPE_AP) {
                qi.tqi_cwmax = 0;
        } else {
                /* Adhoc mode; important thing is to use 2x cwmin. */
-               qi.tqi_aifs = sc->beacon.beacon_qi.tqi_aifs;
-               qi.tqi_cwmin = 2*sc->beacon.beacon_qi.tqi_cwmin;
-               qi.tqi_cwmax = sc->beacon.beacon_qi.tqi_cwmax;
+               qnum = ath_tx_get_qnum(sc, ATH9K_TX_QUEUE_DATA,
+                                      ATH9K_WME_AC_BE);
+               ath9k_hw_get_txq_props(ah, qnum, &qi_be);
+               qi.tqi_aifs = qi_be.tqi_aifs;
+               qi.tqi_cwmin = 4*qi_be.tqi_cwmin;
+               qi.tqi_cwmax = qi_be.tqi_cwmax;
        }
 
        if (!ath9k_hw_set_txq_props(ah, sc->beacon.beaconq, &qi)) {
 
        if (ret)
                ath_print(common, ATH_DBG_FATAL, "TXQ Update failed\n");
 
+       if (sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC)
+               if ((qnum == sc->tx.hwq_map[ATH9K_WME_AC_BE]) && !ret)
+                       ath_beaconq_config(sc);
+
        mutex_unlock(&sc->mutex);
 
        return ret;