30 May, 2014

1 commit


27 May, 2014

1 commit

  • Generalize the power conversion from mW to dBm
    using log. This should fix the below compilation
    error for country NO which adds a new power value
    2000mW which is not handled earlier.

    CC [M] net/wireless/wext-sme.o
    CC [M] net/wireless/regdb.o
    net/wireless/regdb.c:1130:1: error: Unknown undeclared here (not in
    a function)
    net/wireless/regdb.c:1130:9: error: expected } before power
    make[2]: *** [net/wireless/regdb.o] Error 1
    make[1]: *** [net/wireless] Error 2
    make: *** [net] Error 2

    Reported-By: John Walker
    Signed-off-by: Chaitanya T K
    Acked-by: John W. Linville
    [remove unneeded parentheses, fix rounding by using %.0f]
    Signed-off-by: Johannes Berg

    chaitanya.mgit@gmail.com
     

26 May, 2014

1 commit


23 May, 2014

1 commit


22 May, 2014

1 commit

  • Channels in 2.4GHz band overlap, this means that if we
    send a probe request on channel 1 and then move to channel
    2, we will hear the probe response on channel 2. In this
    case, the RSSI will be lower than if we had heard it on
    the channel on which it was sent (1 in this case).

    The firmware / low level driver can parse the channel in
    the DS IE or HT IE and compensate the RSSI so that it will
    still have a valid value even if we heard the frame on an
    adjacent channel. This can be done up to a certain offset.

    Add this offset as a configuration for the low level driver.
    A low level driver that can compensate the low RSSI in this
    case should assign the maximal offset for which the RSSI
    value is still valid.

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

    Emmanuel Grumbach
     

21 May, 2014

2 commits


20 May, 2014

2 commits

  • Users may need information about the expected throughput
    towards a given peer.
    This value is supposed to consider the size overhead
    generated by the 802.11 header.

    This value is exported in kbps through the get_station() API
    by including it into the station_info object.
    Moreover, it is sent to user space when replying to the
    nl80211 GET_STATION command.

    This information will be useful to the batman-adv module
    which will use it for its new metric computation.

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

    Antonio Quartulli
     
  • This requires changing the nl80211 parsing code a bit to use
    intermediate pointers for the allocation, but clarifies the
    API towards the drivers.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

19 May, 2014

1 commit


15 May, 2014

3 commits

  • Change the type of NL80211_ATTR_CSA_C_OFF_BEACON and
    NL80211_ATTR_CSA_C_OFF_PRESP to be NLA_BINARY which allows
    userspace to use beacons and probe responses with
    multiple CSA counters.
    This isn't breaking the API since userspace can
    continue to use nla_put_u16 for this attributes, which
    is equivalent to a single element u16 array.
    In addition advertise max number of supported CSA counters.
    This is needed when using CSA and eCSA IEs together.

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

    Andrei Otcheretianski
     
  • Add NL80211_ATTR_CSA_C_OFFSETS_TX which holds an array
    of offsets to the CSA counters which should be updated
    when sending a management frames with NL80211_CMD_FRAME.

    This API should be used by the drivers that wish to keep the
    CSA counter updated in probe responses, but do not implement
    probe response offloading and so, do not use
    ieee80211_proberesp_get function.

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

    Andrei Otcheretianski
     
  • There is no need to pass NL80211_IFTYPE_UNSPECIFIED when calling
    cfg80211_chandef_dfs_required() since we always already have the
    interface type. So, pass the actual interface type instead.

    Additionally, have cfg80211_chandef_dfs_required() WARN if the passed
    interface type is NL80211_IFTYPE_UNSPECIFIED, so we can detect
    problems more easily.

    Tested-by: Janusz Dziedzic
    Reported-by: Eliad Peller
    Signed-off-by: Luciano Coelho
    Signed-off-by: Johannes Berg

    Luciano Coelho
     

14 May, 2014

2 commits


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
     

09 May, 2014

1 commit

  • When the driver fails during HW restart or resume, the whole
    stack goes into a very confused state with interfaces being
    up while the hardware is down etc.

    Address this by shutting down everything; we'll run into a
    lot of warnings in the process but that's better than having
    the whole stack get messed up.

    Reviewed-by: Arik Nemtsov
    Signed-off-by: Johannes Berg

    Johannes Berg
     

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
     

05 May, 2014

2 commits

  • Add locked-version for cfg80211_sched_scan_stopped.
    This is used for some users that might want to
    call it when rtnl is already locked.

    Fixes: d43c6b6 ("mac80211: reschedule sched scan after HW restart")
    Cc: stable@vger.kernel.org (3.14+)
    Signed-off-by: Eliad Peller
    Signed-off-by: Johannes Berg

    Eliad Peller
     
  • cfg80211 is notified about connection failures by
    __cfg80211_connect_result() call. However, this
    function currently does not free cfg80211 sme.

    This results in hanging connection attempts in some cases

    e.g. when mac80211 authentication attempt is denied,
    we have this function call:
    ieee80211_rx_mgmt_auth() -> cfg80211_rx_mlme_mgmt() ->
    cfg80211_process_auth() -> cfg80211_sme_rx_auth() ->
    __cfg80211_connect_result()

    but cfg80211_sme_free() is never get called.

    Fixes: ceca7b712 ("cfg80211: separate internal SME implementation")
    Cc: stable@vger.kernel.org (3.10+)
    Signed-off-by: Eliad Peller
    Signed-off-by: Johannes Berg

    Eliad Peller
     

29 Apr, 2014

2 commits


25 Apr, 2014

7 commits

  • Current code checks if the 20MHz bandwidth is allowed for
    particular channel -- if it is not, the channel is disabled.
    Since we need to use 5/10 MHz channels, this code is modified in
    the way that the default bandwidth to check is 5MHz. If the
    maximum bandwidth allowed by the channel is smaller than 5MHz,
    the channel is disabled. Otherwise the channel is used and the
    flags are set according to the bandwidth allowed by the channel.

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

    Rostislav Lisovy
     
  • Since there are frequency bands (e.g. 5.9GHz) allowing channels
    with only 10 or 5 MHz bandwidth, this patch adds attributes that
    allow keeping track about this information.

    When channel attributes are reported to user-space, make sure to
    not break old tools, i.e. if the 'split wiphy dump' is enabled,
    report the extra attributes (if present) describing the bandwidth
    restrictions. If the 'split wiphy dump' is not enabled,
    completely omit those channels that have flags set to either
    IEEE80211_CHAN_NO_10MHZ or IEEE80211_CHAN_NO_20MHZ.

    Add the check for new bandwidth restriction flags in
    cfg80211_chandef_usable() to comply with the restrictions.

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

    Rostislav Lisovy
     
  • Return NOTIFY_DONE if we don't care this time's notification, return
    NOTIFY_OK if we successfully handled this time's notification. That's
    the formal way to do it.

    Signed-off-by: Zhao, Gang
    Signed-off-by: Johannes Berg

    Zhao, Gang
     
  • Name wiphy_to_rdev is more accurate to describe what the function
    does, i.e., return a pointer pointing to struct
    cfg80211_registered_device.

    Signed-off-by: Zhao, Gang
    Signed-off-by: Johannes Berg

    Zhao, Gang
     
  • Name "dev" is too common and ambiguous, let all the pointer name
    pointing to struct cfg80211_registered_device be "rdev". This can
    improve code readability and consistency(since other places have
    already called it rdev).

    Signed-off-by: Zhao, Gang
    Signed-off-by: Johannes Berg

    Zhao, Gang
     
  • The patch splits cfg80211_check_combinations()
    into an iterator function and a simple iteration
    user.

    This makes it possible for drivers to asses how
    many channels can use given iftype setup. This in
    turn can be used for future
    multi-interface/multi-channel channel switching.

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

    Michal Kazior
     
  • At some locations, channels 149-165 are considered a single
    bundle, while at some other locations, e.g., Indonesia, channels
    149-161 are considered a single bundle, while channel 165 belongs
    to a different bundle. This means that:

    1. A station interface connection to an AP on channel 165 allows
    the instantiation of a P2P GO on channels 149-165.
    2. A station interface connection to an AP on channels 149-161
    does NOT allow the instantiation of a P2P GO on channel 165.

    Fix this.

    Signed-off-by: Ilan Peer
    Signed-off-by: Johannes Berg

    Ilan Peer
     

22 Apr, 2014

2 commits

  • This allows processing of the last regulatory request when
    we determine its still pending. Without this if a regulatory
    request failed to get processed by userspace we wouldn't
    be able to re-process it later. An example situation that can
    lead to an unprocessed last_request is enabling cfg80211 to
    be built-in to the kernel, not enabling CFG80211_INTERNAL_REGDB
    and the CRDA binary not being available at the time the udev
    rule that kicks of CRDA triggers.

    In such a situation we want to let some cfg80211 triggers
    eventually kick CRDA for us again. Without this if the first
    cycle attempt to kick off CRDA failed we'd be stuck without
    the ability to change process any further regulatory domains.

    cfg80211 will trigger re-processing of the regulatory queue
    whenever schedule_work(®_work) is called, currently this
    happens when:

    * suspend / resume
    * disconnect
    * a beacon hint gets triggered (non DFS 5 GHz AP found)
    * a regulatory request gets added to the queue

    We don't have any specific opportunistic late boot triggers
    to address a late mount of where CRDA resides though, adding
    that should be done separately through another patch.
    Without an opportunistic fix then this fix relies at least
    one of the triggeres above to happen.

    Reported-by: Sander Eikelenboom
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg

    Luis R. Rodriguez
     
  • Avoid freeing the last request while it is being processed. This can
    happen in some cases if reg_work is kicked for some reason while the
    currently pending request is in flight.

    Cc: Sander Eikelenboom
    Tested-by: Eliad Peller
    Tested-by: Colleen Twitty
    Signed-off-by: Arik Nemtsov
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg

    Arik Nemtsov
     

11 Apr, 2014

1 commit


10 Apr, 2014

3 commits


09 Apr, 2014

5 commits