10 Mar, 2009

24 commits


07 Mar, 2009

2 commits


06 Mar, 2009

14 commits

  • This fixes compilation, if the PCI core is disabled.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Michael Buesch
     
  • debugfs ath9k/phy#/wiphy can be used to show the current list of
    virtual wiphys and to add/remove virtual wiphys. Eventually, this
    interface could be replaced with a cfg80211/nl80211 command that is
    passed through mac80211.

    For example:
    # cat /debug/ath9k/phy0/wiphy
    primary: phy0
    # echo add > /debug/ath9k/phy0/wiphy
    # cat /debug/ath9k/phy0/wiphy
    primary: phy0
    secondary: phy1
    # echo del=phy1 > /debug/ath9k/phy0/wiphy
    # cat /debug/ath9k/phy0/wiphy
    primary: phy0

    In addition, following commands can be used to test pausing and
    unpausing of the virtual wiphys:
    pause=phy1
    unpause=phy1
    select=phy1
    (select pauses and unpauses wiphys automatically based on channel)
    schedule=500
    (set wiphy scheduling interval in msec; 0 = disable; default value: 500)

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • This is a very simple scheduler that goes through the wiphys and
    schedules one at a time every N milliseconds (current default value:
    500 ms). This is enough for initial testing, but there are number of
    areas where a more complex scheduler can improve operations greatly.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • Allow mac80211-controlled channel changes on an active wiphy and
    especially during a scan. We need this as long as the scan is
    controlled by mac80211. Moving this control into the driver could
    allow some optimizations on scanning while using multiple virtual
    interfaces, but for now, try to work as well as possible with the
    current scan mechanism.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • It looks like channel change may fail in some cases and end up leaving
    the hardware in state where it cannot transmit any frames. Add a
    workaround to recover from this state if we detect that wiphy
    selection is failing due to wiphys not leaving PAUSING state.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • mac80211 should not be requesting us to transmit frames on paused
    wiphys since we stop the TX queues. Just in case, add debug code to
    make sure we catch if this were to happen.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • For now, allow channel changes immediately and just force the other
    virtual wiphys to paused state. This is needed to allow
    mac80211-controlled scan to control channel changes.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • Notify the AP that we may be sleeping longer to allow the AP power
    save code to buffer larger number of frames for us when using virtual
    wiphys.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • Instead of always going through initialization/deinitialization steps,
    do this only for the first/last wiphy to not break the other wiphys.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • ath9k_wiphy_select() can be used to select a virtual wiphy to be
    activated. Other virtual wiphys will be paused and once that is done,
    the operational channel is changed and the wiphys that are on the
    selected channel will be unpaused.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • Allow virtual wiphys to be paused/unpaused to allow off-channel
    operations. Pause will stop all TX queues for the wiphy and move the
    STA into power save mode if in managed mode. Unpause wakes up the TX
    queues and notifies the AP that the STA woke up if in managed mode.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • Allow RX filter to pass through all broadcast/multicast frames (i.e.,
    no BSSID filtering) if virtual interfaces are used. Software filtering
    will be used in this case to drop broadcast/multicast frames for
    foreign BSSIDs.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • The new struct ath_softc::sec_wiphy array is used to store information
    about virtual wiphys and select which wiphy is used in calls to
    mac80211. Each virtual wiphy will be assigned a different MAC address
    based on the virtual wiphy index.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • This is the initial step in allowing ath9k to register multiple
    virtual radios (wiphys). The goal of virtual radios is to allow the
    same radio to be shared for multiple virtual interfaces that may
    operate on different channels. The mac80211 virtual interface support
    is designed only for single channel operation and as such, it is not
    suitable for this type of use. Anyway, it can be used on top of the
    virtual radio concept, if desired (e.g., use two virtual radios to
    handle two channels and then add multiple mac80211 virtual interfaces
    on top of each virtual radio).

    The new struct ath_wiphy is now registered as the driver data
    structure for wiphy. This structure has a pointer to the shared (among
    virtual wiphys of the same physical radio) struct ath_softc data. The
    primary wiphy maintains the allocated memory for ath_softc. Secondary
    (virtual) wiphys will only allocate the new ath_wiphy structure.

    Registration of secondary wiphys is added in a separate patch.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen