source: trunk/package/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch @ 26685

Last change on this file since 26685 was 26685, checked in by nbd, 6 years ago

ath5k: allow simultaneous ad-hoc+ap operation

File size: 1.6 KB
  • drivers/net/wireless/ath/ath5k/mac80211-ops.c

    a b ath5k_add_interface(struct ieee80211_hw  
    9797                goto end; 
    9898        } 
    9999 
    100         /* Don't allow other interfaces if one ad-hoc is configured. 
    101          * TODO: Fix the problems with ad-hoc and multiple other interfaces. 
    102          * We would need to operate the HW in ad-hoc mode to allow TSF updates 
    103          * for the IBSS, but this breaks with additional AP or STA interfaces 
    104          * at the moment. */ 
    105         if (sc->num_adhoc_vifs || 
    106             (sc->nvifs && vif->type == NL80211_IFTYPE_ADHOC)) { 
     100        /* Don't allow more than one ad-hoc interface */ 
     101        if (sc->num_adhoc_vifs && vif->type == NL80211_IFTYPE_ADHOC) { 
    107102                ATH5K_ERR(sc, "Only one single ad-hoc interface is allowed.\n"); 
    108103                ret = -ELNRNG; 
    109104                goto end; 
  • drivers/net/wireless/ath/ath5k/base.c

    a b ath5k_beacon_send(struct ath5k_softc *sc 
    18571857                sc->bmisscount = 0; 
    18581858        } 
    18591859 
    1860         if ((sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) || 
     1860        if ((sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs + sc->num_adhoc_vifs > 1) || 
    18611861                        sc->opmode == NL80211_IFTYPE_MESH_POINT) { 
    18621862                u64 tsf = ath5k_hw_get_tsf64(ah); 
    18631863                u32 tsftu = TSF_TO_TU(tsf); 
    ath5k_beacon_update_timers(struct ath5k_ 
    19351935        u64 hw_tsf; 
    19361936 
    19371937        intval = sc->bintval & AR5K_BEACON_PERIOD; 
    1938         if (sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) { 
     1938        if (sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs + sc->num_adhoc_vifs > 1) { 
    19391939                intval /= ATH_BCBUF;    /* staggered multi-bss beacons */ 
    19401940                if (intval < 15) 
    19411941                        ATH5K_WARN(sc, "intval %u is too low, min 15\n", 
Note: See TracBrowser for help on using the repository browser.