15 Mar, 2011

1 commit

  • When running an AP interface along with the cooked monitor interface created
    by hostapd, adding an interface and deleting it again triggers a channel type
    recalculation during which the (non-HT) monitor interface takes precedence
    over the HT AP interface, thus causing the channel type to be set to non-HT.
    Fix this by ensuring that a more wide channel type will not be overwritten
    by a less wide channel type.

    Signed-off-by: Felix Fietkau
    Signed-off-by: John W. Linville

    Felix Fietkau
     

17 Sep, 2010

1 commit

  • Instead of using a WARN_ON(!mutex_is_locked())
    use lockdep_assert_held() which compiles away
    completely when lockdep isn't enabled, and
    also is a more accurate assertion since it
    checks that the current thread is holding the
    mutex.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

29 May, 2010

1 commit


08 May, 2010

2 commits

  • Currently, when one interface switches HT mode,
    all others will follow along. This is clearly
    undesirable, since the new one might switch to
    no-HT while another one is operating in HT.

    Address this issue by keeping track of the HT
    mode per interface, and allowing only changes
    that are compatible, i.e. switching into HT40+
    is not possible when another interface is in
    HT40-, in that case the second one needs to
    fall back to HT20.

    Also, to allow drivers to know what's going on,
    store the per-interface HT mode (channel type)
    in the virtual interface's bss_conf.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Currently (all tested with hwsim) you can do stupid
    things like setting up an AP on a certain channel,
    then adding another virtual interface and making
    that associate on another channel -- this will make
    the beaconing to move channel but obviously without
    the necessary IEs data update.

    In order to improve this situation, first make the
    configuration APIs (cfg80211 and nl80211) aware of
    multi-channel operation -- we'll eventually need
    that in the future anyway. There's one userland API
    change and one API addition. The API change is that
    now SET_WIPHY must be called with virtual interface
    index rather than only wiphy index in order to take
    effect for that interface -- luckily all current
    users (hostapd) do that. For monitor interfaces, the
    old setting is preserved, but monitors are always
    slaved to other devices anyway so no guarantees.

    The second userland API change is the introduction
    of a per virtual interface SET_CHANNEL command, that
    hostapd should use going forward to make it easier
    to understand what's going on (it can automatically
    detect a kernel with this command).

    Other than mac80211, no existing cfg80211 drivers
    are affected by this change because they only allow
    a single virtual interface.

    mac80211, however, now needs to be aware that the
    channel settings are per interface now, and needs
    to disallow (for now) real multi-channel operation,
    which is another important part of this patch.

    One of the immediate benefits is that you can now
    start hostapd to operate on a hardware that already
    has a connection on another virtual interface, as
    long as you specify the same channel.

    Note that two things are left unhandled (this is an
    improvement -- not a complete fix):

    * different HT/no-HT modes

    currently you could start an HT AP and then
    connect to a non-HT network on the same channel
    which would configure the hardware for no HT;
    that can be fixed fairly easily

    * CSA

    An AP we're connected to on a virtual interface
    might indicate switching channels, and in that
    case we would follow it, regardless of how many
    other interfaces are operating; this requires
    more effort to fix but is pretty rare after all

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg