12 Apr, 2012

1 commit


10 Apr, 2012

39 commits

  • In certain scenarios involving sched scan + normal scan + COEX
    scan could take longer than 10s and this triggers a recovery
    where it shouldn't. Increase the timeout to avoid that.

    Signed-off-by: Eyal Shapira
    Signed-off-by: Luciano Coelho

    Eyal Shapira
     
  • Set the dwell times for sched scan according to the number
    of probe requests which are going to be transmitted.
    This should fix the too short dwell time problem which
    prevented some of the probe requests from being transmitted
    in cases of high number of SSIDs (10+) to be actively sched scanned.
    However, in the common case of having up to 1-2 SSIDs that
    require active scan, the dwell time would be kept to a minimum
    which should conserve power. This is important as sched scan
    also runs periodically while the host is suspended and there's
    great importance to keep power consumption as low as possible.

    Signed-off-by: Eyal Shapira
    [fixed a couple of new strict checkpatch warnings]
    Signed-off-by: Luciano Coelho

    Eyal Shapira
     
  • wlvif->probereq is zeroed when adding an interface but
    the skb pointed to isn't freed when the interface is removed.
    This would lead to a mem leak on every recovery.
    Fix it by freeing the skb when removing the interface.

    Signed-off-by: Eyal Shapira
    Signed-off-by: Luciano Coelho

    Eyal Shapira
     
  • The ap keys should be freed only when removing
    ap role (otherwise, some arbitrary data might
    get freed).

    Signed-off-by: Eliad Peller
    Signed-off-by: Luciano Coelho

    Eliad Peller
     
  • On the PandaBoard (omap_hsmmc + wl12xx_sdio) with DMA_API_DEBUG:

    WARNING: at lib/dma-debug.c:930 check_for_stack.part.8+0x7c/0xe0()
    omap_hsmmc omap_hsmmc.4: DMA-API: device driver maps memory fromstack

    Signed-off-by: Mircea Gherzan
    Signed-off-by: Luciano Coelho

    Mircea Gherzan
     
  • The iteration on the wlvif list in wl1271_op_resume/suspend was
    perfomed before locking wl->mutex which would lead to a kernel
    panic in case a recovery was queued at the same time
    and would delete the wlvifs from the list.

    Signed-off-by: Eyal Shapira
    Signed-off-by: Luciano Coelho

    Eyal Shapira
     
  • Channel switch complete event wasn't handled
    properly in station mode, as we checked wrong
    CS flag.

    Signed-off-by: Victor Goldenshtein
    Signed-off-by: Luciano Coelho

    Victor Goldenshtein
     
  • wl12xx sets the do_join flag (which later starts the
    sta role) when the bssid was changed and the sta is
    associated. However, this no longer happens after
    the "mac80211: remove spurious BSSID change flag"
    patch.

    Fix it by setting the do_join flag on BSS_CHANGED_ASSOC
    (for IBSS, do_join is already set on BSS_CHANGED_IBSS)

    Signed-off-by: Eliad Peller
    Signed-off-by: Luciano Coelho

    Eliad Peller
     
  • Move the POWER_PMI to the op_mode where it is changed. The trans needs
    to check it frequently, so shadow the status in the trans and update it
    in trans when it infrequently changes.

    Signed-off-by: Don Fry
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Don Fry
     
  • The op_mode should check for FW_ERROR before calling send_cmd. This
    removes the need to test for FW_ERROR in the trans layer.

    Signed-off-by: Don Fry
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Don Fry
     
  • With error logging now completely handled in
    the op_mode, the transport layer does not
    need to know information about the loaded
    firmware.

    Remove this state information from the
    iwl_shared data structure.

    Signed-off-by: Meenakshi Venkataraman
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Meenakshi Venkataraman
     
  • iwl_get_single_channel_number is used only in
    iwl-scan.c, move it there and mark it static.

    Signed-off-by: Meenakshi Venkataraman
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Meenakshi Venkataraman
     
  • iwl_full_rxon_required is used only in
    iwl-agn-rxon.c. Move it there and mark it
    static.

    Signed-off-by: Meenakshi Venkataraman
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Meenakshi Venkataraman
     
  • iwl_check_rxon_cmd is used only in
    iwl-agn-rxon.c. Move it there and mark it
    static.

    Signed-off-by: Meenakshi Venkataraman
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Meenakshi Venkataraman
     
  • iwl_set_rxon_hwcrypto is used only in
    iwl-agn-rxon.c. Move it there and mark it
    static.

    Signed-off-by: Meenakshi Venkataraman
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Meenakshi Venkataraman
     
  • iwl_send_rxon_timing is used only in
    iwl-agn-rxon.c, move it there and mark it
    static.

    Signed-off-by: Meenakshi Venkataraman
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Meenakshi Venkataraman
     
  • This is used only in one file, move it there
    and make it static.

    Signed-off-by: Meenakshi Venkataraman
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Meenakshi Venkataraman
     
  • This variable holds the ucode currently
    running on the device; which is determined by
    op_mode, so move this parameter there.

    Also, the name of the variable is a bit
    misleading, so rename it to cur_ucode.

    Signed-off-by: Meenakshi Venkataraman
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Meenakshi Venkataraman
     
  • Error log reporting does not belong to the
    transport layer, but to the op_mode loading
    the ucode, as it is the entity which knows
    about the ucode loaded, and what the error
    information means.

    Move device logging pointers from the
    transport layer to op_mode.

    With this change, transport layer only
    reports an error to the op_mode, which will
    figure out what to do with the error. This
    causes the driver to now dump out error logs
    when the command queue is stuck as well.

    Also, move the debugfs entry for event logs
    out of the transport layer and into op_mode.

    Signed-off-by: Meenakshi Venkataraman
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Meenakshi Venkataraman
     
  • iwl_nic_error is used in iwl-agn.c only, move
    it there and make it static.

    Signed-off-by: Meenakshi Venkataraman
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Meenakshi Venkataraman
     
  • In the process, make iwlagn_fw_error
    a non-static function, as it is used
    by more than one file.

    Signed-off-by: Meenakshi Venkataraman
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Meenakshi Venkataraman
     
  • No other component is accessing it any more,
    so it can move to the correct place in priv.

    Signed-off-by: Johannes Berg
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • The queue mapping is not only dynamic, it
    is also dependent on the uCode, as we can
    already see today with the dual-mode and
    non-dual-mode being different.

    Move the queue mapping out of the transport
    layer and let the higher layer manage it.
    Part of the transport configuration is how
    to set up the queues.

    Signed-off-by: Johannes Berg
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • As idle is just a deep powersave mode for
    the device, it will easily scan while idle
    since that turns off powersave.

    This reduces the number of commands sent
    to the device when scanning.

    Signed-off-by: Johannes Berg
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • This is not (no longer?) used by any device
    so just remove it.

    Signed-off-by: Johannes Berg
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • This is used only by 2000 class devices, but
    they all use it so remove the configuration
    parameter and hard-code the programming.

    Signed-off-by: Johannes Berg
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • There's no device using this mechanism.

    Signed-off-by: Johannes Berg
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • It talks about treating different uCode APIs
    as different pieces of hardware which really
    isn't how we handle things.

    Signed-off-by: Johannes Berg
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • A whole bunch of messages, even some recent ones,
    didn't include a trailing newline so add it.

    Signed-off-by: Johannes Berg
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • The calibration results all come in while we're
    waiting for the calibration complete notification.
    As a consequence, there's no need to install a
    global RX handler for them, we can use the newly
    extended notification wait framework for this and
    make the code easier to follow.

    It is now quite explicit that we are processing
    the calibration results while waiting for the
    complete notification, before this was implicit
    and developers had to know this to understand why
    we wait for the calibration complete notification
    and what happens while we wait.

    Signed-off-by: Johannes Berg
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Sometimes, for example when we ask the uCode
    for calibration, we wait for the "complete"
    response while we also need the results that
    are sent in other, interim, notifications.

    Currently we handle this by installing an RX
    handler globally, but that isn't needed as
    this is the only time we want to use these
    notifications.

    So in order to be able to simplify at least
    future code that does the same, extend the
    notification wait framework to allow you to
    wait for multiple commands and decide based
    on the command whether the wait finished.

    While at it, also fix a race that can then
    become relevant -- if the wait function has
    returned true once it shouldn't be called
    again, today this can happen due to races
    between the triggering and the wakeup.

    Signed-off-by: Johannes Berg
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • The flow handler (hardware) can put multiple
    frames into a single RX buffer. To handle
    this, walk the RX buffer and check if there
    are multiple valid packets in it.

    To let the upper layer handle this correctly
    introduce rxb_offset() which is needed when
    we pass pages to mac80211 -- we need to know
    the offset into the page there.

    Also change the page handling scheme to use
    refcounting. Anyone who needs a page will
    "steal" it, which marks it as having been
    used & refcounts it. The RX handler then has
    to free its own reference and must not reuse
    the page.

    Finally, do not set the bit asking the FH to
    give us each packet in a single buffer. This
    really enables the feature.

    Signed-off-by: Johannes Berg
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • get rid of un-needed parameter

    Change-Id: I992741e7382a3dbced7f8413bf1d5f301029d576
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Wey-Yi Guy
     
  • Add iwl_phy_db structure and API.

    Signed-off-by: David Spinadel
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    David Spinadel
     
  • It has happened twice now where elaborate troubleshooting has
    undergone on systems where CONFIG_CFG80211_INTERNAL_REGDB [0]
    has been set but yet net/wireless/db.txt was not updated.

    Despite the documentation on this it seems system integrators could
    use some more help with this, so throw out a kernel warning at boot time
    when their database is empty.

    This does mean that the error-prone system integrator won't likely
    realize the issue until they boot the machine but -- it does not seem
    to make sense to enable a build bug breaking random build testing.

    [0] http://wireless.kernel.org/en/developers/Regulatory/CRDA#CONFIG_CFG80211_INTERNAL_REGDB

    Cc: Stephen Rothwell
    Cc: Youngsin Lee
    Cc: Raja Mani
    Cc: Senthil Kumar Balasubramanian
    Cc: Vipin Mehta
    Cc: yahuan@qca.qualcomm.com
    Cc: jjan@qca.qualcomm.com
    Cc: vthiagar@qca.qualcomm.com
    Cc: henrykim@qualcomm.com
    Cc: jouni@qca.qualcomm.com
    Cc: athiruve@qca.qualcomm.com
    Cc: cjkim@qualcomm.com
    Cc: philipk@qca.qualcomm.com
    Cc: sunnykim@qualcomm.com
    Cc: sskwak@qualcomm.com
    Cc: kkim@qualcomm.com
    Cc: mattbyun@qualcomm.com
    Cc: ryanlee@qualcomm.com
    Cc: simbap@qualcomm.com
    Cc: krislee@qualcomm.com
    Cc: conner@qualcomm.com
    Cc: hojinkim@qualcomm.com
    Cc: honglee@qualcomm.com
    Cc: johnwkim@qualcomm.com
    Cc: jinyong@qca.qualcomm.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     
  • This patch is intended to solve the follwing issues in RANN propagation:
    [1] The interval in propagated RANN should be based on the interval of received RANN.
    [2] The aggregated path metric for propagated RANN is as received plus own link metric
    towards the transmitting mesh STA (not root mesh STA).
    [3] The comparison of path metric for RANN with same sequence number should be done
    before deciding whether to propagate or not.

    Signed-off-by: Chun-Yeow Yeoh
    Signed-off-by: John W. Linville

    Chun-Yeow Yeoh
     
  • The current version of rtlwifi for USB operations uses kmalloc to
    acquire a 32-bit buffer for each read of the device. When
    _usb_read_sync() is called with the rcu_lock held, the result is
    a "sleeping function called from invalid context" BUG. This is
    reported for two cases in https://bugzilla.kernel.org/show_bug.cgi?id=42775.
    The first case has the lock originating from within rtlwifi and could
    be fixed by rearranging the locking; however, the second originates from
    within mac80211. The kmalloc() call is removed from _usb_read_sync()
    by creating a ring buffer pointer in the private area and
    allocating the buffer data in the probe routine.

    Signed-off-by: Larry Finger
    Cc: Stable [This version good for 3.3+ - different patch for 3.2 - 2.6.39]
    Signed-off-by: John W. Linville

    Larry Finger
     
  • The HWMP sequence number of received RANN element is compared to decide whether to be
    propagated. The sequence number is required to covert from 32bit little endian data into
    CPUs endianness for comparison. The same applies to the RANN metric.

    Signed-off-by: Chun-Yeow Yeoh
    Signed-off-by: Javier Cardona
    Signed-off-by: John W. Linville

    Chun-Yeow Yeoh
     
  • When receiving DTIM we currently disable power save mode in the
    hardware unconditionally, i.e. also when the hardware was not sleeping.
    This causes trouble with at least one wireless chipset (Ralink RT3572).
    When the hardware is not sleeping and we send a wakeup command (e.g.
    this happens after a scan) then a significant decrease of the link
    quality or a disconnect may occur.
    Disabling power save mode only when it was enabled prevents this issue.

    Signed-off-by: Ronald Wahl
    Reviewed-by: Gertjan van Wingerde
    Signed-off-by: John W. Linville

    Ronald Wahl