30 Oct, 2009

1 commit


28 Oct, 2009

8 commits

  • This makes the mesh housekeeping timer work properly on big endian
    systems.

    Signed-off-by: Rui Paulo
    Signed-off-by: Javier Cardona
    Signed-off-by: John W. Linville

    Rui Paulo
     
  • Mesh portals proxy traffic for nodes external to the mesh. When a
    proxied frame is received by a mesh interface, it should update its mesh
    portal table. This was only happening for unicast frames. With this
    change we also learn about mesh portals from proxied multicast frames.

    Signed-off-by: Javier Cardona
    Signed-off-by: John W. Linville

    Javier Cardona
     
  • Replace netif_tx_{start,stop,wake}_all_queues with the single-queue
    equivalents (i.e. netif_{start,stop,wake}_queue). Since we are down to
    a single queue, these should peform slightly better.

    Signed-off-by: John W. Linville

    John W. Linville
     
  • Get rid of cookies in cfg80211_send_XXX() functions.

    Signed-off-by: Holger Schurig
    Signed-off-by: John W. Linville

    Holger Schurig
     
  • When hostapd injects a frame, e.g. an authentication or association
    response, mac80211 looks for a suitable access point virtual interface
    to associate the frame with based on its source address. This makes it
    possible e.g. to correctly assign sequence numbers to the frames.

    A small typo in the ethernet address comparison statement caused a
    failure to find a suitable ap interface. Sequence numbers on such
    frames where therefore left unassigned causing some clients
    (especially windows-based 11b/g clients) to reject them and fail to
    authenticate or associate with the access point. This patch fixes the
    typo in the address comparison statement.

    Signed-off-by: Björn Smedman
    Reviewed-by: Johannes Berg
    Cc: stable@kernel.org
    Signed-off-by: John W. Linville

    Björn Smedman
     
  • Fix a typo in the description of hwmp_route_info_get(), no function
    changes.

    Signed-off-by: Andrey Yurovsky
    Signed-off-by: John W. Linville

    Andrey Yurovsky
     
  • When association fails, we should stay authenticated,
    which in mac80211 is represented by the existence of
    the mlme work struct, so we cannot free that, instead
    we need to just set it to idle.

    (Brought to you by the hacking session at Kernel Summit 2009 in Tokyo,
    Japan. -- JWL)

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

    Johannes Berg
     
  • Recent commit "mac80211: fix logic error ibss merge bssid check" fixed
    joining of ibss cell when static bssid is provided. In this case
    ifibss->bssid is set before the cell is joined and comparing that address
    to a bss should thus always succeed. Unfortunately this change broke the
    other case of joining a ibss cell without providing a static bssid where
    the value of ifibss->bssid is not set before the cell is joined.

    Since ifibss->bssid may be set before or after joining the cell we do not
    learn anything by comparing it to a known bss. Remove this check.

    Signed-off-by: Reinette Chatre
    Signed-off-by: John W. Linville

    Reinette Chatre
     

14 Oct, 2009

1 commit


13 Oct, 2009

3 commits

  • ieee80211_rx() must be called with softirqs disabled
    since the networking stack requires this for netif_rx()
    and some code in mac80211 can assume that it can not
    be processing its own tasklet and this call at the same
    time.

    It may be possible to remove this requirement after a
    careful audit of mac80211 and doing any needed locking
    improvements in it along with disabling softirqs around
    netif_rx(). An alternative might be to push all packet
    processing to process context in mac80211, instead of
    to the tasklet, and add other synchronisation.

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

    Johannes Berg
     
  • When a scan completes, we call ieee80211_sta_find_ibss(),
    which is also called from other places. When the scan was
    done in software, there's no problem as both run from the
    single-threaded mac80211 workqueue and are thus serialised
    against each other, but with hardware scan the completion
    can be in a different context and race against callers of
    this function from the workqueue (e.g. due to beacon RX).
    So instead of calling ieee80211_sta_find_ibss() directly,
    just arm the timer and have it fire, scheduling the work,
    which will invoke ieee80211_sta_find_ibss() (if that is
    appropriate in the current state).

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

    Johannes Berg
     
  • Signed-off-by: Felix Fietkau
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Felix Fietkau
     

12 Oct, 2009

1 commit


08 Oct, 2009

3 commits

  • Signed-off-by: John W. Linville

    John W. Linville
     
  • kfree_skb() should be used to free struct sk_buff pointers.

    Signed-off-by: Roel Kluin
    Acked-by: Johannes Berg
    Cc: stable@kernel.org
    Signed-off-by: John W. Linville

    Roel Kluin
     
  • When receiving data frames, we can send them only to
    the interface they belong to based on transmitting
    station (this doesn't work for probe requests). Also,
    don't try to handle other frames for AP_VLAN at all
    since those interface should only receive data.

    Additionally, the transmit side must check that the
    station we're sending a frame to is actually on the
    interface we're transmitting on, and not transmit
    packets to functions that live on other interfaces,
    so validate that as well.

    Another bug fix is needed in sta_info.c where in the
    VLAN case when adding/removing stations we overwrite
    the sdata variable we still need.

    Signed-off-by: Johannes Berg
    Cc: stable@kernel.org
    Signed-off-by: John W. Linville

    Johannes Berg
     

05 Oct, 2009

1 commit


30 Sep, 2009

1 commit

  • Consider the following step-by step:
    1. A STA authenticates and associates with the AP and exchanges
    traffic.
    2. The STA reports to the AP that it is going to PS state.
    3. Some time later the STA device goes to the stand-by mode (not only
    its wi-fi card, but the device itself) and drops the association state
    without sending a disassociation frame.
    4. The STA device wakes up and begins authentication with an
    Auth frame as it hasn't been authenticated/associated previously.

    At the step 4 the AP "remembers" the STA and considers it is still in
    the PS state, so the AP buffers frames, which it has to send to the STA.
    But the STA isn't actually in the PS state and so it neither checks
    TIM bits nor reports to the AP that it isn't power saving.
    Because of that authentication/[re]association fails.

    To fix authentication/[re]association stage of this issue, Auth, Assoc
    Resp and Reassoc Resp frames are transmitted disregarding of STA's power
    saving state.

    N.B. This patch doesn't fix further data frame exchange after
    authentication/[re]association. A patch in hostapd is required to fix
    that.

    Signed-off-by: Igor Perminov
    Signed-off-by: John W. Linville

    Igor Perminov
     

29 Sep, 2009

1 commit

  • It's useful to know the MAC address when being
    disassociated; fix a typo (missing colon) and
    move some messages so we get them only when they
    are actually taking effect.

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

    Johannes Berg
     

23 Sep, 2009

2 commits

  • When the DTIM setting is read from beacons, mac80211 will
    assume it is 1 if the TIM IE is not present or the value
    is 0. This sounds fine, but the same function processes
    probe responses as well, which don't have a TIM IE. This
    leads to overwriting any values previously parsed out of
    beacon frames.

    Thus, instead of checking for the presence of the TIM IE
    when setting the default, simply check whether the DTIM
    period value is valid already. If the TIM IE is not there
    then the value cannot be valid (it is initialised to 0)
    and probe responses received after beacons will not lead
    to overwriting an already valid value.

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

    Johannes Berg
     
  • The contention window is supposed to be a power of two minus one, i.e.
    15, 31, 63, 127... minstrel_rate_init() forgets to subtract 1, so the
    sequence becomes 15, 32, 66, 134...

    Bug reported by Dan Halperin

    Signed-off-by: Pavel Roskin
    Signed-off-by: John W. Linville

    Pavel Roskin
     

12 Sep, 2009

1 commit

  • The Ethernet framing is used for a lot of devices these days. Most
    prominent are WiFi and WiMAX based devices. However for userspace
    application it is important to classify these devices correctly and
    not only see them as Ethernet devices. The daemons like HAL, DeviceKit
    or even NetworkManager with udev support tries to do the classification
    in userspace with a lot trickery and extra system calls. This is not
    good and actually reaches its limitations. Especially since the kernel
    does know the type of the Ethernet device it is pretty stupid.

    To solve this problem the underlying device type needs to be set and
    then the value will be exported as DEVTYPE via uevents and available
    within udev.

    # cat /sys/class/net/wlan0/uevent
    DEVTYPE=wlan
    INTERFACE=wlan0
    IFINDEX=5

    This is similar to subsystems like USB and SCSI that distinguish
    between hosts, devices, disks, partitions etc.

    The new SET_NETDEV_DEVTYPE() is a convenience helper to set the actual
    device type. All device types are free form, but for convenience the
    same strings as used with RFKILL are choosen.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: David S. Miller

    Marcel Holtmann
     

03 Sep, 2009

2 commits


02 Sep, 2009

1 commit


01 Sep, 2009

1 commit

  • Mostly just simple conversions:
    * ray_cs had bogus return of NET_TX_LOCKED but driver
    was not using NETIF_F_LLTX
    * hostap and ipw2x00 had some code that returned value
    from a called function that also had to change to return netdev_tx_t

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

29 Aug, 2009

9 commits

  • When the queued management work items are processed in
    ieee80211_sta_work() an item could be removed. This could change the
    anybusy from true to false, so we better check whether we can start a
    new scan only after having processed the pending work first.

    Signed-off-by: Jouni Malinen
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • When an interface is taken down while a scan is
    pending -- i.e. a scan request was accepted but
    not yet acted upon due to other work being in
    progress -- we currently do not properly cancel
    that scan and end up getting stuck. Fix this by
    doing better checks when an interface is taken
    down.

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

    Johannes Berg
     
  • An integer overflow in the minstrel debug code prevented the
    throughput to be displayed correctly. This patch fixes that,
    by permutating operations like proposed by Pavel Roskin.

    Signed-off-by: Arnd Hannemann
    Signed-off-by: John W. Linville

    Arnd Hannemann
     
  • In mac80211's RX path some of the warnings that
    warn about drivers passing invalid status values
    leak the skb, fix that by refactoring the code.

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

    Johannes Berg
     
  • I noticed that the throughput field of the minstrel_rate struct is never used,
    so remove it.

    Signed-off-by: Arnd Hannemann
    Signed-off-by: John W. Linville

    Arnd Hannemann
     
  • Due to the way the tasklets work in mac80211 there's
    no need to ever disable them.

    However, we need to clear the pending packets when
    taking down the last interface because otherwise
    the tx_pending_tasklet might be queued if the
    driver mucks with the queues (which it shouldn't).

    I've had a situation occasionally with ar9170 in
    which ksoftirq was using 100% CPU time because
    a disabled tasklet was scheduled, and I think that
    was due to ar9170 receiving a packet while the
    tasklet was disabled. That's strange and it really
    should not do that for other reasons, but there's
    no need to waste that much CPU time over it, it
    should just warn instead.

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

    Johannes Berg
     
  • With the libipw naming scheme change, it is no longer necessary for
    mac80211 to avoid the ieee80211_rx name clash.

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

    John W. Linville
     
  • Since configure_filter can sleep now, any multicast
    configuration needed to be postponed to a work struct.
    This, however, lead to a problem that we could queue
    the work, stop the device and then afterwards invoke
    configure_filter which may lead to driver hangs and is
    a bug. To fix this, we can just cancel the filter work
    since it's unnecessary to do after stopping the hw.

    Since there are various places that call drv_stop, and
    two of them do very similar things, the code for them
    can be put into a shared function at the same time.

    Signed-off-by: Johannes Berg
    Reported-by: Lennert Buytenhek
    Tested-by: Lennert Buytenhek
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • The mesh config information element has changed significantly since draft 1.08
    This patch brings it up to date.

    Thanks to Sam Leffler and Rui Paulo for identifying this.

    Signed-off-by: Javier Cardona
    Signed-off-by: John W. Linville

    Javier Cardona
     

20 Aug, 2009

4 commits

  • "cfg80211: fix alignment problem in scan request"
    introduced a bug into the error path, because now
    we allocate the entire scan request and not just
    the channel list (the channel list is allocated
    together with the scan request) -- on errors we
    thus also need to free the entire scan request.

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

    Johannes Berg
     
  • This expands on the current fwded_frames stat counter which should be equal to
    the total of these two new counters. The new counters are called "fwded_mcast"
    and "fwded_unicast".

    Signed-off-by: Daniel Walker
    Signed-off-by: Javier Cardona
    Signed-off-by: John W. Linville

    Daniel Walker
     
  • CC [M] net/mac80211/rc80211_pid_algo.o
    net/mac80211/rc80211_pid_algo.c: In function ‘rate_control_pid_rate_init’:
    net/mac80211/rc80211_pid_algo.c:304: warning: unused variable ‘si’

    Signed-off-by: John W. Linville

    John W. Linville
     
  • Mesh uses the tx failure average to compute the (m)path metric. This used to
    be done inside the rate control module. This patch breaks the dependency
    between the mesh stack and the rate control algorithm. Mesh will now work
    independently of the chosen rate control algorithm.

    The mesh stack keeps a moving average of the average transmission losses for
    each mesh peer station. If the fail average exceeds a certain threshold, the
    peer link is marked as broken.

    Signed-off-by: Javier Cardona
    Signed-off-by: John W. Linville

    Javier Cardona