12 Apr, 2016

1 commit

  • This enum is already perfectly aliased to enum nl80211_band, and
    the only reason for it is that we get IEEE80211_NUM_BANDS out of
    it. There's no really good reason to not declare the number of
    bands in nl80211 though, so do that and remove the cfg80211 one.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

05 Mar, 2016

1 commit


24 Feb, 2016

5 commits


04 Dec, 2015

2 commits


29 May, 2015

1 commit

  • It was possible for mac80211 to be coerced into an
    unexpected flow causing sdata union to become
    corrupted. Station pointer was put into
    sdata->u.vlan.sta memory location while it was
    really master AP's sdata->u.ap.next_beacon. This
    led to station entry being later freed as
    next_beacon before __sta_info_flush() in
    ieee80211_stop_ap() and a subsequent invalid
    pointer dereference crash.

    The problem was that ieee80211_ptr->use_4addr
    wasn't cleared on interface type changes.

    This could be reproduced with the following steps:

    # host A and host B have just booted; no
    # wpa_s/hostapd running; all vifs are down
    host A> iw wlan0 set type station
    host A> iw wlan0 set 4addr on
    host A> printf 'interface=wlan0\nssid=4addrcrash\nchannel=1\nwds_sta=1' > /tmp/hconf
    host A> hostapd -B /tmp/conf
    host B> iw wlan0 set 4addr on
    host B> ifconfig wlan0 up
    host B> iw wlan0 connect -w hostAssid
    host A> pkill hostapd
    # host A crashed:

    [ 127.928192] BUG: unable to handle kernel NULL pointer dereference at 00000000000006c8
    [ 127.929014] IP: [] __sta_info_flush+0xac/0x158
    ...
    [ 127.934578] [] ieee80211_stop_ap+0x139/0x26c
    [ 127.934578] [] ? dump_trace+0x279/0x28a
    [ 127.934578] [] __cfg80211_stop_ap+0x84/0x191
    [ 127.934578] [] cfg80211_stop_ap+0x3f/0x58
    [ 127.934578] [] nl80211_stop_ap+0x1b/0x1d
    [ 127.934578] [] genl_family_rcv_msg+0x259/0x2b5

    Note: This isn't a revert of f8cdddb8d61d
    ("cfg80211: check iface combinations only when
    iface is running") as far as functionality is
    considered because b6a550156bc ("cfg80211/mac80211:
    move more combination checks to mac80211") moved
    the logic somewhere else already.

    Fixes: f8cdddb8d61d ("cfg80211: check iface combinations only when iface is running")
    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     

26 May, 2015

1 commit

  • When we disconnect from the AP, drivers call cfg80211_disconnect().
    This doesn't know whether the disconnection was initiated locally
    or by the AP though, which can cause problems with the supplicant,
    for example with WPS. This issue obviously doesn't show up with any
    mac80211 based driver since mac80211 doesn't call this function.

    Fix this by requiring drivers to indicate whether the disconnect is
    locally generated or not. I've tried to update the drivers, but may
    not have gotten the values correct, and some drivers may currently
    not be able to report correct values. In case of doubt I left it at
    false, which is the current behaviour.

    For libertas, make adjustments as indicated by Dan Williams.

    Reported-by: Matthieu Mauger
    Tested-by: Matthieu Mauger
    Signed-off-by: Johannes Berg

    Johannes Berg
     

07 Apr, 2015

1 commit


30 Mar, 2015

1 commit

  • Seems Broadcom TDLS peers (Nexus 5, Xperia Z3) refuse to allow TDLS
    connection when channel-switching is supported but the regulatory
    classes IE is missing from the setup request.
    Add a chandef to reg-class translation function to cfg80211 and use it
    to add the required IE during setup. For now add only the current
    regulatory class as supported - it is enough to resolve the
    compatibility issue.

    Signed-off-by: Arik Nemtsov
    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Arik Nemtsov
     

03 Mar, 2015

1 commit


05 Feb, 2015

1 commit

  • …inux/kernel/git/jberg/mac80211-next

    Last round of updates for net-next:
    * revert a patch that caused a regression with mesh userspace (Bob)
    * fix a number of suspend/resume related races
    (from Emmanuel, Luca and myself - we'll look at backporting later)
    * add software implementations for new ciphers (Jouni)
    * add a new ACPI ID for Broadcom's rfkill (Mika)
    * allow using netns FD for wireless (Vadim)
    * some other cleanups (various)

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     

28 Jan, 2015

1 commit


27 Jan, 2015

2 commits


23 Jan, 2015

1 commit


20 Jan, 2015

1 commit

  • …inux/kernel/git/jberg/mac80211-next

    Some further updates for net-next:
    * fix network-manager which was broken by the previous changes
    * fix delete-station events, which were broken by me making the
    genlmsg_end() mistake
    * fix a timer left running during suspend in some race conditions
    that would cause an annoying (but harmless) warning
    * (less important, but in the tree already) remove 80+80 MHz rate
    reporting since the spec doesn't distinguish it from 160 MHz;
    as the bitrate they're both 160 MHz bandwidth

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     

16 Jan, 2015

1 commit

  • For some reason, we made the bandwidth separate flags, which
    is rather confusing - a single rate cannot have different
    bandwidths at the same time.

    Change this to no longer be flags but use a separate field
    for the bandwidth ('bw') instead.

    While at it, add support for 5 and 10 MHz rates - these are
    reported as regular legacy rates with their real bitrate,
    but tagged as 5/10 now to make it easier to distinguish them.

    In the nl80211 API, the flags are preserved, but the code
    now can also clearly only set a single one of the flags.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

15 Jan, 2015

1 commit

  • These rates are treated the same as 160 MHz in the spec, so
    it makes no sense to distinguish them. As no driver uses them
    yet, this is also not a problem, just remove them.

    In the userspace API the field remains reserved to preserve
    API and ABI.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

14 Jan, 2015

1 commit


04 Nov, 2014

1 commit

  • This patch adds new iface type (NL80211_IFTYPE_OCB) representing
    the OCB (Outside the Context of a BSS) mode.
    When establishing a connection to the network a cfg80211_join_ocb
    function is called (particular nl80211_command is added as well).
    A mandatory parameters during the ocb_join operation are 'center
    frequency' and 'channel width (5/10 MHz)'.

    Changes done in mac80211 are minimal possible required to avoid
    many warnings (warning: enumeration value 'NL80211_IFTYPE_OCB'
    not handled in switch) during compilation. Full functionality
    (where needed) is added in the following patch.

    Signed-off-by: Rostislav Lisovy
    Signed-off-by: Johannes Berg

    Rostislav Lisovy
     

11 Sep, 2014

1 commit


05 Sep, 2014

1 commit

  • Our legal structure changed at some point (see wikipedia), but
    we forgot to immediately switch over to the new copyright
    notice.

    For files that we have modified in the time since the change,
    add the proper copyright notice now.

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

    Johannes Berg
     

21 May, 2014

1 commit

  • Implement and export the new cfg80211_get_station() API.
    This utility can be used by other kernel modules to obtain
    detailed information about a given wireless station.

    It will be in particular useful to batman-adv which will
    implement a wireless rate based metric.

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

    Antonio Quartulli
     

19 May, 2014

1 commit


13 May, 2014

1 commit

  • At the moment, the ath9k/ath10k DFS module only supports detecting ETSI
    radar patterns.
    Add a bitmap in the interface combinations, indicating which DFS regions
    are supported by the detector. If unset, support for all regions is
    assumed.

    Signed-off-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Felix Fietkau
     

06 May, 2014

1 commit

  • This exports a new cfg80211_stop_iface() function.

    This is intended for driver internal interface
    combination management and channel switching.

    Due to locking issues (it re-enters driver) the
    call is asynchronous and uses cfg80211 event
    list/worker.

    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     

25 Apr, 2014

2 commits


09 Apr, 2014

4 commits

  • All bits from radar_detect must match combination
    radar bitmask. Otherwise it is theoretically
    possible to lead into an invalid combination
    provided a driver reports strange combinations.

    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     
  • Get rid of the cfg80211_can_add_interface() and
    cfg80211_can_change_interface() functions by moving that functionality
    to mac80211. With this patch all interface combination checks are now
    out of cfg80211 (except for the channel switch case which will be
    addressed in a future commit).

    Additionally, modify the ieee80211_check_combinations() function so
    that an undefined chandef can be passed, in order to use it before a
    channel is defined.

    Signed-off-by: Luciano Coelho
    Signed-off-by: Johannes Berg

    Luciano Coelho
     
  • Move the counting part of the interface combination check from
    cfg80211 to mac80211.

    This is needed to simplify locking when the driver has to perform a
    combination check by itself (eg. with channel-switch).

    Signed-off-by: Luciano Coelho
    Signed-off-by: Johannes Berg

    Luciano Coelho
     
  • Separate the code that counts the interface types and channels from
    the code that check the interface combinations. The new function that
    checks for combinations is exported so it can be called by the
    drivers.

    This is done in preparation for moving the interface combinations
    checks out of cfg80211.

    Signed-off-by: Luciano Coelho
    Signed-off-by: Johannes Berg

    Luciano Coelho
     

22 Mar, 2014

1 commit


20 Mar, 2014

1 commit


14 Mar, 2014

1 commit


05 Mar, 2014

1 commit

  • MPLS labels may contain traffic control information, which should be
    evaluated and used by the wireless subsystem if present.

    Also check for IEEE 802.21 which is always network control traffic.

    Signed-off-by: Simon Wunderlich
    Signed-off-by: Mathias Kretschmer
    Acked-by: Johannes Berg
    Signed-off-by: David S. Miller

    Simon Wunderlich