02 Aug, 2013

2 commits


01 Aug, 2013

1 commit

  • When a P2P GO interface goes down, cfg80211 doesn't properly
    tear it down, leading to warnings later. Add the GO interface
    type to the enumeration to tear it down like AP interfaces.
    Otherwise, we leave it pending and mac80211's state can get
    very confused, leading to warnings later.

    Cc: stable@vger.kernel.org
    Reported-by: Ilan Peer
    Tested-by: Ilan Peer
    Reviewed-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Johannes Berg
     

31 Jul, 2013

1 commit

  • This is similar to the race Linus had reported, but in this case
    it's an older bug: nl80211_prepare_wdev_dump() uses the wiphy
    index in cb->args[0] as it is and thus parses the message over
    and over again instead of just once because 0 is the first valid
    wiphy index. Similar code in nl80211_testmode_dump() correctly
    offsets the wiphy_index by 1, do that here as well.

    Cc: stable@vger.kernel.org
    Reported-by: Ben Hutchings
    Signed-off-by: Johannes Berg

    Johannes Berg
     

25 Jul, 2013

1 commit


16 Jul, 2013

10 commits

  • Whether the wiphy supports it or not is already checked, so what is left
    is to enable these channel types.

    Signed-off-by: Simon Wunderlich
    Signed-off-by: Mathias Kretschmer
    Signed-off-by: Johannes Berg

    Simon Wunderlich
     
  • Mandatory rates for 5 and 10 MHz are different from the rates used for
    20 MHz in 2.4 GHz mode, as they use OFDM only.

    Signed-off-by: Simon Wunderlich
    Signed-off-by: Mathias Kretschmer
    Signed-off-by: Johannes Berg

    Simon Wunderlich
     
  • To allow scanning and working with 5 MHz and 10 MHz BSS, extend the
    inform bss commands and add wrappers to take 5 and 10 MHz bss into
    account.

    Signed-off-by: Simon Wunderlich
    Signed-off-by: Mathias Kretschmer
    Signed-off-by: Johannes Berg

    Simon Wunderlich
     
  • In most cases, host that receives IPv4 and IPv6 multicast/broadcast
    packets does not do anything with these packets. Therefore the
    reception of these unwanted packets causes unnecessary processing
    and power consumption.

    Packet coalesce feature helps to reduce number of received
    interrupts to host by buffering these packets in firmware/hardware
    for some predefined time. Received interrupt will be generated when
    one of the following events occur.
    a) Expiration of hardware timer whose expiration time is set to
    maximum coalescing delay of matching coalesce rule.
    b) Coalescing buffer in hardware reaches it's limit.
    c) Packet doesn't match any of the configured coalesce rules.

    This patch adds set/get configuration support for packet coalesce.
    User needs to configure following parameters for creating a coalesce
    rule.
    a) Maximum coalescing delay
    b) List of packet patterns which needs to be matched
    c) Condition for coalescence. pattern 'match' or 'no match'
    Multiple such rules can be created.

    This feature needs to be advertised during driver initialization.
    Drivers are supposed to do required firmware/hardware settings based
    on user configuration.

    Signed-off-by: Amitkumar Karwar
    Signed-off-by: Bing Zhao
    [fix kernel-doc, change free function, fix copy/paste error]
    Signed-off-by: Johannes Berg

    Amitkumar Karwar
     
  • Signed-off-by: Simon Wunderlich
    Signed-off-by: Mathias Kretschmer
    Signed-off-by: Johannes Berg

    Simon Wunderlich
     
  • Currently packet patterns and it's enum/structures are used only
    for WoWLAN feature. As we intend to reuse them for new feature
    packet coalesce, they are renamed in this patch.

    Older names are kept for backward compatibility purpose.

    Signed-off-by: Amitkumar Karwar
    Signed-off-by: Bing Zhao
    Signed-off-by: Johannes Berg

    Amitkumar Karwar
     
  • RSSI threshold value used for mesh peering should be in
    negative value. After range checks to mesh parameters is
    introduced, this is not allowed. Fix this.

    Signed-off-by: Chun-Yeow Yeoh
    Signed-off-by: Johannes Berg

    Chun-Yeow Yeoh
     
  • restore_regulatory_settings() requires the RTNL to be held,
    add the missing locking in reg_timeout_work().

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • When splitting the SME implementation from the MLME code,
    I introduced a few bugs:
    * association failures no longer sent a connect-failure event
    * getting disassociated from the AP caused deauth to be sent
    but state wasn't cleaned up, leading to warnings
    * authentication failures weren't cleaned up properly, causing
    new connection attempts to warn and fail

    Fix these bugs.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • These two events were sent to the default network
    namespace.

    This caused AP mode in a non-default netns to not
    work correctly. Mgmt tx status was multicasted to
    a different (default) netns instead of the one the
    AP was in.

    Cc: stable@vger.kernel.org
    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     

29 Jun, 2013

1 commit


24 Jun, 2013

4 commits


22 Jun, 2013

1 commit


20 Jun, 2013

6 commits

  • Conflicts:
    drivers/net/wireless/ath/ath9k/Kconfig
    drivers/net/xen-netback/netback.c
    net/batman-adv/bat_iv_ogm.c
    net/wireless/nl80211.c

    The ath9k Kconfig conflict was a change of a Kconfig option name right
    next to the deletion of another option.

    The xen-netback conflict was overlapping changes involving the
    handling of the notify list in xen_netbk_rx_action().

    Batman conflict resolution provided by Antonio Quartulli, basically
    keep everything in both conflict hunks.

    The nl80211 conflict is a little more involved. In 'net' we added a
    dynamic memory allocation to nl80211_dump_wiphy() to fix a race that
    Linus reported. Meanwhile in 'net-next' the handlers were converted
    to use pre and post doit handlers which use a flag to determine
    whether to hold the RTNL mutex around the operation.

    However, the dump handlers to not use this logic. Instead they have
    to explicitly do the locking. There were apparent bugs in the
    conversion of nl80211_dump_wiphy() in that we were not dropping the
    RTNL mutex in all the return paths, and it seems we very much should
    be doing so. So I fixed that whilst handling the overlapping changes.

    To simplify the initial returns, I take the RTNL mutex after we try
    to allocate 'tb'.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This fixes the potential issue that the BSS struct that we use
    and later assign to wdev->current_bss is removed from the scan
    list while associating.

    Also warn when we don't have a BSS struct in connect_result
    unless it's from a driver that only has the connect() API.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Doing so will allow us to hold the BSS (not just ref it) over the
    association process, thus ensuring that it doesn't time out and
    gets invisible to the user (e.g. in 'iw wlan0 link'.)

    This also fixes a leak in mac80211 where it doesn't always release
    the BSS struct properly in all cases where calling this function.
    This leak was reported by Ben Greear.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Avoid parsing the original dump message again and again by
    allocating a small state struct that is used by the functions
    involved in the dump, storing this struct in cb->args[0].
    This reduces the memory allocation size as well.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Merge mac80211 to avoid conflicts with the nl80211 attrbuf
    changes.

    Conflicts:
    net/mac80211/iface.c
    net/wireless/nl80211.c

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Since my commit 3713b4e364 ("nl80211: allow splitting wiphy
    information in dumps"), nl80211_dump_wiphy() uses the global
    nl80211_fam.attrbuf for parsing the incoming data. This wouldn't
    be a problem if it only did so on the first dump iteration which
    is locked against other commands in generic netlink, but due to
    space constraints in cb->args (the needed state doesn't fit) I
    decided to always parse the original message. That's racy though
    since nl80211_fam.attrbuf could be used by some other parsing in
    generic netlink concurrently.

    For now, fix this by allocating a separate parse buffer (it's a
    bit too big for the stack, currently 1448 bytes on 64-bit). For
    -next, I'll change the code to parse into the global buffer in
    the first round only and then allocate a smaller buffer to keep
    the data in cb->args.

    Reported-by: Linus Torvalds
    Acked-by: David S. Miller
    Acked-by: John W. Linville
    Signed-off-by: Johannes Berg

    Johannes Berg
     

18 Jun, 2013

2 commits


12 Jun, 2013

1 commit


11 Jun, 2013

5 commits

  • In two wiphy dump error cases, most often when the dump allocation
    must be increased, the RTNL is leaked. This quickly results in a
    complete system lockup. Release the RTNL correctly.

    Reported-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Users may want to send a frame on the current channel
    without specifying it.

    This is particularly useful for the correct implementation
    of the IBSS/RSN support in wpa_supplicant which requires to
    receive and send AUTH frames.

    Make mgmt_tx pass a NULL channel to the driver if none has
    been specified by the user.

    Signed-off-by: Antonio Quartulli
    Signed-off-by: Johannes Berg

    Antonio Quartulli
     
  • I (Johannes) accidentally applied the first version of the patch
    ("Allow TDLS peer AID to be configured for VHT"). Now apply just
    the changes between v1 and v2 to get the AID verification and
    prefer the new attribute over the old one.

    Signed-off-by: Jouni Malinen
    Signed-off-by: Johannes Berg

    Jouni Malinen
     
  • Currently mesh uses mandatory rates as the default basic rates. Allow basic
    rates to be configured during mesh join. Basic rates are applied only if
    channel is also provided with mesh join command.

    Signed-off-by: Ashok Nagarajan
    [some whitespace fixes, refuse basic rates w/o channel]
    Signed-off-by: Johannes Berg

    Ashok Nagarajan
     
  • If a STA has a peer that it hasn't seen any tx activity
    from for a certain length of time, the peer link is
    expired. This means the inactive STA is removed from the
    list of peers and that STA is not considered a peer again
    unless it re-peers. Previously, this inactivity time was
    always 30 minutes. Now, add it to the mesh configuration
    and allow it to be configured. Retain 30 minutes as a
    default value.

    Signed-off-by: Colleen Twitty
    Signed-off-by: Johannes Berg

    Colleen Twitty
     

06 Jun, 2013

1 commit

  • Merge 'net' bug fixes into 'net-next' as we have patches
    that will build on top of them.

    This merge commit includes a change from Emil Goode
    (emilgoode@gmail.com) that fixes a warning that would
    have been introduced by this merge. Specifically it
    fixes the pingv6_ops method ipv6_chk_addr() to add a
    "const" to the "struct net_device *dev" argument and
    likewise update the dummy_ipv6_chk_addr() declaration.

    Signed-off-by: David S. Miller

    David S. Miller
     

05 Jun, 2013

2 commits

  • The change to use atomic_inc_return() for assigning the wiphy
    index made the first wiphy index 1 instead of 0. This is fine,
    but we all habitually type "phy0" when we're testing, so make
    it go back to 0 instead of 1 by subtracting 1 from the index.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • My big locking cleanups caused a problem by registering the
    rfkill instance with the RTNL held, while the callback also
    acquires the RTNL. This potentially causes a deadlock since
    the two locks used (rfkill mutex and RTNL) can be acquired
    in two different orders. Fix this by (un)registering rfkill
    without holding the RTNL. This needs to be done after the
    device struct is registered, but that can also be done w/o
    holding the RTNL.

    Signed-off-by: Johannes Berg

    Johannes Berg