07 Aug, 2012

1 commit

  • libertas currently calls cfg80211_disconnected() when it is being
    brought down. This causes an event to be allocated, but since the
    wdev is already removed from the rdev by the time that the event
    processing work executes, the event is never processed or freed.
    http://article.gmane.org/gmane.linux.kernel.wireless.general/95666

    Fix this leak, and other possible situations, by processing the event
    queue when a device is being unregistered. Thanks to Johannes Berg for
    the suggestion.

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

    Daniel Drake
     

02 Aug, 2012

2 commits

  • Restore the default state to the "beacon_found" flag when
    the channel flags are restored. Otherwise, we can end up
    with a channel that we can no longer transmit on even when
    we can see beacons on that channel.

    Signed-off-by: Paul Stewart
    Signed-off-by: Johannes Berg

    Paul Stewart
     
  • Currently the only way for wireless drivers to tell whether or not OFDM
    is allowed on the current channel is to check the regulatory
    information. However, this requires hodling cfg80211_mutex, which is not
    visible to the drivers.

    Other regulatory restrictions are provided as flags in the channel
    definition, so let's do similarly with OFDM. This patch adds a new flag,
    IEEE80211_CHAN_NO_OFDM, to tell drivers that OFDM on a channel is not
    allowed. This flag is set on any channels for which regulatory indicates
    that OFDM is prohibited.

    Signed-off-by: Seth Forshee
    Tested-by: Arend van Spriel
    Signed-off-by: Johannes Berg

    Seth Forshee
     

30 Jul, 2012

1 commit


25 Jul, 2012

1 commit

  • commit eccc068e8e84c8fe997115629925e0422a98e4de
    Author: Hong Wu
    Date: Wed Jan 11 20:33:39 2012 +0200

    wireless: Save original maximum regulatory transmission power for the calucation of the local maximum transmit pow

    changed the way we calculate chan->max_power as min(chan->max_power,
    chan->max_reg_power). That broke rt2x00 (and perhaps some other
    drivers) that do not set chan->max_power. It is not so easy to fix this
    problem correctly in rt2x00.

    According to commit eccc068e8 changelog, change claim only to save
    maximum regulatory power - changing setting of chan->max_power was side
    effect. This patch restore previous calculations of chan->max_power and
    do not touch chan->max_reg_power.

    Cc: stable@vger.kernel.org # 3.4+
    Signed-off-by: Stanislaw Gruszka
    Acked-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg

    Stanislaw Gruszka
     

21 Jul, 2012

1 commit


18 Jul, 2012

1 commit

  • should fix the following issue

    [ 3229.815012] [ BUG: lock held when returning to user space! ]
    [ 3229.815016] 3.5.0-rc7-wl #28 Tainted: G W O
    [ 3229.815017]
    ------------------------------------------------
    [ 3229.815019] wpa_supplicant/5783 is leaving the kernel with locks still held!
    [ 3229.815022] 1 lock held by wpa_supplicant/5783:
    [ 3229.815023] #0: (reg_mutex){+.+.+.}, at: []
    reg_last_request_cell_base+0x1d/0x60 [cfg80211]

    Cc: Luis Rodriguez
    Signed-off-by: Mohammed Shafi Shajakhan
    Tested-by: Luciano Coelho
    Signed-off-by: Johannes Berg

    Mohammed Shafi Shajakhan
     

17 Jul, 2012

8 commits

  • regulatory_update() just calls wiphy_update_regulatory().
    wiphy_update_regulatory() assumes you already have
    the reg_mutex held so just move the call within locking
    context and kill the superfluous regulatory_update().

    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg

    Luis R. Rodriguez
     
  • Now that we have wiphy_regulatory_register() we can
    tuck away the core's regulatory_update() call there
    and make it static.

    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg

    Luis R. Rodriguez
     
  • This makes it clearer what we're doing. This now makes a bit
    more sense given that regardless of the wiphy if the cell
    base station hint feature is supported we will be modifying the
    way the regulatory core behaves.

    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg

    Luis R. Rodriguez
     
  • Cellular base stations can provide hints to cfg80211 about
    where they think we are. This can be done for example on
    a cell phone. To enable these hints we simply allow them
    through as user regulatory hints but we allow userspace
    to clasify the hint as either coming directly from the
    user or coming from a cellular base station. This option
    is only available when you enable
    CONFIG_CFG80211_CERTIFICATION_ONUS.

    The base station hints themselves will not be processed
    by the core unless at least one device on the system
    supports this feature.

    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg

    Luis R. Rodriguez
     
  • This adds CONFIG_CFG80211_CERTIFICATION_ONUS which is to
    be used for features / code which require a bit of work on
    the system integrator's part to ensure that the system will
    still pass 802.11 regulatory certification. This option is
    also usable for researchers and experimenters looking to add
    code in the kernel without impacting compliant code.

    We'd use CONFIG_EXPERT alone but it seems that most standard
    Linux distributions are enabling CONFIG_EXPERT already. This
    allows us to define 802.11 specific kernel features under a
    flag that is intended by design to be disabled by standard
    Linux distributions, and only enabled by system integrators
    or distributions that have done work to ensure regulatory
    certification on the system with the enabled features.

    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg

    Luis R. Rodriguez
     
  • While adding regulatory support to ath6kl I noticed that I easily
    got the regulatory code confused. The way to reproduce the bug was:

    1. iw reg set FI (in userspace)
    2. cfg80211 calls ath6kl_reg_notify(FI)
    3. ath6kl sets regdomain in firmware
    4. firmware sends regdomain event to notify about the new regdomain (FI)
    5. ath6kl calls regulatory_hint(FI)

    And this (from FI to FI transition) confuses cfg80211 and after that I
    only get "Pending regulatory request, waiting for it to be
    processed...." messages and regdomain changes won't work anymore.

    The reason why ath6kl calls regulatory_hint() is that firmware can change
    the regulatory domain by it's own, for example due to 11d IEs. I could
    of course workaround this in ath6kl but I think it's better to handle
    the case in cfg80211.

    The fix is pretty simple, use a different error code if the regdomain is
    same and then just set the request processed so that it doesn't block new
    requests.

    Signed-off-by: Kalle Valo
    Signed-off-by: Johannes Berg

    Kalle Valo
     
  • Let the user configure serveral TX error conection quality monitoring
    parameters: % error rate, survey interval, and # of attempted packets.

    On exceeding the TX failure rate over the given interval, the driver
    will send a CQM notify event with the actual TX failure rate and
    packets attempted.

    Signed-off-by: Thomas Pedersen
    Signed-off-by: Johannes Berg

    Thomas Pedersen
     
  • In one of my previous patches I erroneously
    used nla_put_u32 for the wdev_id, fix that
    to use nla_put_u64.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

13 Jul, 2012

4 commits

  • Revert commit b78e8ceac23655e1e06b30aa95ab11742d1ac7c0
    ("cfg80211: track monitor channel") and remove the
    set_monitor_enabled() callback.

    Due to the tracking happening in NETDEV_PRE_UP, it had
    introduced bugs because the monitor interface callback
    would be called before the device was started. It looks
    like there's no way to fix this, and using NETDEV_PRE_UP
    is broken anyway (since there's no NETDEV_UP_FAIL), so
    remove all that code, track interfaces in NETDEV_UP and
    also stop tracking the monitor channel in cfg80211.

    This mostly reverts to before the tracking, except that
    we keep the interface count tracking so that setting the
    monitor channel can be rejected properly.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • This essentially reverts commit 2e165b818456 but
    introduces the get_channel operation with a new
    wireless_dev argument so that you can retrieve
    the channel per interface. This is necessary as
    even though we can track all interface channels
    (except monitor) we can't track the channel type
    used.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • It may be desirable to use WoWLAN without triggers to
    keep the connection alive to the AP while suspended.
    Allow this use by enabling WoWLAN without triggers if
    no triggers were requested.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • …wireless-next into for-davem

    John W. Linville
     

12 Jul, 2012

5 commits


09 Jul, 2012

5 commits

  • The management frame and remain-on-channel APIs will be
    needed in the P2P device abstraction, so move them over
    to the new wdev-based APIs. Userspace can still use both
    the interface index and wdev identifier for them so it's
    backward compatible, but for the P2P Device wdev it will
    be able to use the wdev identifier only.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • There are a few places that iterate the wdev
    list and assume wdev->netdev exists, check
    there. The rfkill one has to be extended for
    each non-netdev type later.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Since soon there will be virtual interfaces that
    don't have a netdev, use the wdev identifier for
    the API to retrieve interface data.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Some nl80211 callbacks will soon need the wdev instead
    of the netdev, so add NL80211_FLAG_NEED_WDEV to allow
    them to request that. Add NL80211_FLAG_NEED_WDEV_UP as
    well which checks the netdev is UP if one exists.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • In order to support a P2P device abstraction and
    Bluetooth high-speed AMPs, we need to have a way
    to identify virtual interfaces that don't have a
    netdev associated.

    Do this by adding a NL80211_ATTR_WDEV attribute
    to identify a wdev which may or may not also be
    a netdev.

    To simplify things, use a 64-bit value with the
    high 32 bits being the wiphy index for this new
    wdev identifier in the nl80211 API.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

08 Jul, 2012

1 commit


05 Jul, 2012

2 commits

  • 60g band uses different from .11n MCS scheme, so bitrate
    should be calculated differently

    Signed-off-by: Vladimir Kondratiev
    Signed-off-by: Johannes Berg

    Vladimir Kondratiev
     
  • Until now, a u16 value was used to represent bitrate value.
    With VHT bitrates this becomes too small.

    Introduce a new 32-bit bitrate attribute. nl80211 will report
    both the new and the old attribute, unless the bitrate doesn't
    fit into the old u16 attribute in which case only the new one
    will be reported.

    User space tools encouraged to prefer the 32-bit attribute, if
    available (since it won't be available on older kernels.)

    Signed-off-by: Vladimir Kondratiev
    [reword commit message and comments a bit]
    Signed-off-by: Johannes Berg

    Vladimir Kondratiev
     

04 Jul, 2012

1 commit

  • Michal's monitor channel tracking introduce a locking problem
    as it locked the rdev lock inside the netdev notifier which
    isn't allowed as we might already hold it if we get there by
    removing an interface that is up.

    Fix this by relying only on the RTNL to protect the interface
    counters, the RTNL is always held in these code paths anyway.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

02 Jul, 2012

2 commits


30 Jun, 2012

1 commit


29 Jun, 2012

4 commits