1. 10 3月, 2016 16 次提交
    • H
      brcmfmac: Remove waitqueue_active check · 107b8713
      Hui Wang 提交于
      We met a problem of pm_suspend  when repeated closing/opening the lid
      on a Lenovo laptop (1/20 reproduce rate), below is the log:
      
      [ 199.735876] PM: Entering mem sleep
      [ 199.750516] e1000e: EEE TX LPI TIMER: 00000011
      [ 199.856638] Trying to free nonexistent resource <000000000000d000-000000000000d0ff>
      [ 201.753566] brcmfmac: brcmf_pcie_suspend: Timeout on response for entering D3 substate
      [ 201.753581] pci_legacy_suspend(): brcmf_pcie_suspend+0x0/0x1f0 [brcmfmac] returns -5
      [ 201.753585] dpm_run_callback(): pci_pm_suspend+0x0/0x160 returns -5
      [ 201.753589] PM: Device 0000:04:00.0 failed to suspend async: error -5
      
      Through debugging, we found when problem happens, it is not the device
      fails to enter D3, but the signal D3_ACK comes too early to pass the
      waitqueue_active() check.
      
      Just like this:
      brcmf_pcie_send_mb_data(devinfo, BRCMF_H2D_HOST_D3_INFORM);
      // signal is triggered here
      wait_event_timeout(devinfo->mbdata_resp_wait, devinfo->mbdata_completed,
      		   BRCMF_PCIE_MBDATA_TIMEOUT);
      
      So far I think it is safe to remove waitqueue_active check since there
      is only one place to trigger this signal (sending
      BRCMF_H2D_HOST_D3_INFORM). And it is not a problem calling wake_up
      event earlier than calling wait_event.
      
      Cc: Brett Rudley <brudley@broadcom.com>
      Cc: Hante Meuleman <meuleman@broadcom.com>
      Cc: Franky (Zhenhui) Lin <frankyl@broadcom.com>
      Cc: Pieter-Paul Giesberts <pieterpg@broadcom.com>
      Cc: Arend van Spriel <arend@broadcom.com>
      Signed-off-by: NHui Wang <hui.wang@canonical.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      107b8713
    • D
      libertas: fix an error code in probe · 3691ac4a
      Dan Carpenter 提交于
      We accidentally return success instead of a negative error code.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      3691ac4a
    • K
      Merge tag 'iwlwifi-next-for-kalle-2016-03-09_2' of... · 6ab882a8
      Kalle Valo 提交于
      Merge tag 'iwlwifi-next-for-kalle-2016-03-09_2' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
      
      * update GSCAN capabilities (Ayala)
      * fix AES-CMAC in AP mode (Johannes)
      * adapt prints to new firmware API
      * rx path improvements (Sara and Gregory)
      * fixes for the thermal / cooling device code (Chaya Rachel)
      * fixes for GO uAPSD handling
      * more code for the 9000 device family (Sara)
      * infrastructure work for firmware notification (Chaya Rachel)
      * improve association reliablity (Sara)
      * runtime PM fixes
      * fixes for ROC (HS2.0)
      6ab882a8
    • A
      iwlwifi: mvm: update GSCAN capabilities · 5ed47226
      Ayala Beker 提交于
      Gscan capabilities were updated with new capabilities supported
      by the device. While at it, simplify the firmware support
      conditional and move both conditions into the WARN() to make it
      easier to undertand and use the unlikely() for both.
      Signed-off-by: NAyala Beker <ayala.beker@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      5ed47226
    • J
      iwlwifi: mvm: don't try to offload AES-CMAC in AP/IBSS modes · 81279c49
      Johannes Berg 提交于
      The firmware/hardware only supports checking AES-CMAC on RX, not
      using it on TX. For station mode this is fine, since it's the only
      thing it will ever do. For AP mode, it never receives such frames,
      but must be able to transmit them. This is currently broken since
      we try to enable them for hardware crypto (for RX only) and then
      treat them as TX_CMD_SEC_EXT, leading to FIFO underruns during TX
      so the frames never go out to the air.
      
      To fix this, simply use software on TX in AP (and IBSS) mode.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      81279c49
    • E
      iwlwifi: mvm: adapt the firmware assert log to new firmware · 7d3ca7f4
      Emmanuel Grumbach 提交于
      Newer firmware versions put different data in the memory
      which is read by the driver upon firmware crash. Just
      change the variable names in the code and the name of the
      data in the log that we print withouth any functional
      change.
      On older firmware, there will be a mismatch between the
      names that are printed and the content itself, but that's
      harmless.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      7d3ca7f4
    • G
      iwlwifi: pcie: avoid restocks inside rx loop if not emergency · e0e168dc
      Gregory Greenman 提交于
      When trying to reach high Rx throughput of more than 500Mbps on
      a device with a relatively weak CPU (Atom x5-Z8500), CPU utilization
      may become a bottleneck. Analysis showed that we are looping in
      iwl_pcie_rx_handle for very long periods which led to starvation
      of other threads (iwl_pcie_rx_handle runs with _bh disabled).
      We were handling Rx and allocating new buffers and the new buffers
      were ready quickly enough to be available before we had finished
      handling all the buffers available in the hardware. As a
      consequence, we called iwl_pcie_rxq_restock to refill the hardware
      with the new buffers, and start again handling new buffers without
      exiting the function. Since we read the hardware pointer again when
      we goto restart, new buffers were handled immediately instead of
      exiting the function.
      
      This patch avoids refilling RBs inside rx handling loop, unless an
      emergency situation is reached. It also doesn't read the hardware
      pointer again unless we are in an emergency (unlikely) case.
      This significantly reduce the maximal time we spend in
      iwl_pcie_rx_handle with _bh disabled.
      Signed-off-by: NGregory Greenman <gregory.greenman@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      e0e168dc
    • C
      iwlwifi: mvm: return the cooling state index instead of the budget · b358993b
      Chaya Rachel Ivgi 提交于
      iwl_mvm_tcool_get_cur_state is the function that returns the
      cooling state index to the sysfs handler. This function returns
      mvm->cooling_dev.cur_state but that variable was set to the
      budget and not the cooling state index. Fix that.
      Add a missing blank line while at it.
      Signed-off-by: NChaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      b358993b
    • E
      iwlwifi: mvm: remove RRM advertisement · 416cb246
      Emmanuel Grumbach 提交于
      mac80211 advertises this feature for all its drivers.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      416cb246
    • E
      iwlwifi: mvm: don't let NDPs mess the packet tracking · 532beba3
      Emmanuel Grumbach 提交于
      We need to track the next packet that we will reclaim in
      order to know when the Tx queues are empty. This is useful
      when we open or tear down an A-MPDU session which requires
      to switch queue.
      The next packet being reclaimed is identified by its WiFi
      sequence number and this is relevant only when we use QoS.
      QoS NDPs do have a TID but have a meaningless sequence
      number. The spec mandates the receiver to ignore the
      sequence number in this case, allowing the transmitter to
      put any sequence number. Our implementation leaves it 0.
      When we reclaim a QoS NDP, we can't update the next_relcaim
      counter since the sequence number of the QoS NDP itself is
      invalid.
      We used to update the next_reclaim based on the sequence
      number of the QoS NDP which reset it to 1 (0 + 1) and
      because of this, we never knew when the queue got empty.
      This had to sad consequence to stuck the A-MPDU state
      machine in a transient state.
      To fix this, don't update next_reclaim when we reclaim
      a QoS NDP.
      
      Alesya saw this bug when testing u-APSD. Because the
      A-MPDU state machine was stuck in EMPTYING_DELBA, we
      updated mac80211 that we still have frames for that
      station when it got back to sleep. mac80211 then wrongly
      set the TIM bit in the beacon and requested to release
      non-existent frames from the A-MPDU queue. This led to
      a situation where the client was trying to poll frames
      but we had no frames to send.
      Reported-by: NAlesya Shapira <alesya.shapira@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      532beba3
    • S
      iwlwifi: add support for getting HW address from CSR · 17c867bf
      Sara Sharon 提交于
      From 9000 family on, we need to get HW address from host
      CSR registers.
      OEM can override it by fusing the override registers - read
      those first, and if those are 0 - read the OTP registers instead.
      
      In addition - bail out if no valid mac address is present. Make
      it shared for all NICs.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      17c867bf
    • S
      iwlwifi: pcie: fine tune number of rxbs · 7b542436
      Sara Sharon 提交于
      We kick the allocator when we have 2 RBDs that don't have
      attached RBs, and the allocator allocates 8 RBs meaning
      that it needs another 6 RBDs to attach the RBs to.
      The design is that allocator should always have enough RBDs
      to fulfill requests, so we give in advance 6 RBDs to the
      allocator so that when it is kicked, it gets additional 2 RBDs
      and has enough RBDs.
      These RBDs were taken from the Rx queue itself, meaning
      that each Rx queue didn't have the maximal number of
      RBDs, but MAX - 6.
      Change initial number of RBDs in the system to include both
      queue size and allocator reserves.
      Note the multi-queue is always 511 instead of 512 to avoid a
      full queue since we cannot detect this state easily enough in
      the 9000 arch.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      7b542436
    • C
      iwlwifi: mvm: add support for async rx handler without hold the mutex · c9cb14a6
      Chaya Rachel Ivgi 提交于
      When running async rx handler the framework holds the mvm->mutex
      before starting the async handler, that might cause a deadlock in case
      the handler calls to ops that lock the mutex as well.
      Add support for running async rx handler without hold the mutex before
      activating the handler.
      Signed-off-by: NChaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      c9cb14a6
    • M
      iwlwifi: mvm: ROC: cleanup time event info on FW failure · 5151ad95
      Matti Gottlieb 提交于
      Currently when the FW sends start/stop aux roc time event
      notification with an error status, the driver returns an
      error value, but does not remove the time event, and does
      not notify the stack above that the time event is over.
      
      This causes problems that the stack above assumes we are still
      in the middle of a time event, and therefore can block different
      events, such as scanning.
      
      On FW failure notification, cleanup the time event parameters and
      notify the stack above that the time event is over.
      Signed-off-by: NMatti Gottlieb <matti.gottlieb@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      5151ad95
    • S
      iwlwifi: mvm: turn off AMSDU bit in QoS control for de-aggregated AMSDUs · 62d23403
      Sara Sharon 提交于
      Our hardware de-aggregates AMSDUs but copies the mac header
      as it to the de-aggregated MPDUs. We need to turn off the AMSDU
      bit in the QoS control ourselves.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      62d23403
    • C
      iwlwifi: mvm: add ctdp operations to debugfs · 00f481bd
      Chaya Rachel Ivgi 提交于
      Add debugfs entries to get the ctdp budget average
      and to stop ctdp.
      Signed-off-by: NChaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      00f481bd
  2. 08 3月, 2016 2 次提交
    • A
      wireless: cw1200: use __maybe_unused to hide pm functions_ · 836856e3
      Arnd Bergmann 提交于
      The cw1200 uses #ifdef to check for CONFIG_PM, but then
      uses SIMPLE_DEV_PM_OPS, which leaves the references out when
      CONFIG_PM_SLEEP is not defined, so we get a warning with
      PM=y && PM_SLEEP=n:
      
      drivers/net/wireless/st/cw1200/cw1200_spi.c:450:12: error: 'cw1200_spi_suspend' defined but not used [-Werror=unused-function]
      
      This removes the incorrect #ifdef and instead uses a __maybe_unused
      annotation to let the compiler know it can silently drop
      the function definition.
      
      For the DEV_PM_OPS definition, we can use an IS_ENABLED() check
      to avoid defining the structure when CONFIG_PM is not set without
      the #ifdef.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      836856e3
    • L
      rtlwifi: Fix size of wireless mode variable · 73fb2705
      Larry Finger 提交于
      Smatch reports the following warning:
      
        CHECK   drivers/net/wireless/realtek/rtlwifi/rc.c
      drivers/net/wireless/realtek/rtlwifi/rc.c:144 _rtl_rc_rate_set_series() warn: impossible condition '(wireless_mode == 256) => (0-255 == 256)'
      
      This warning arises because commit acc6907b87a9 ("rtlwifi: Fix warning
      from ieee80211_get_tx_rates() when using 5G") now checks the wireless
      mode for WIRELESS_MODE_AC_ONLY (BIT(8)) in _rtl_rc_rate_set_series().
      As a result, all quantities used to store the wireless mode must be u16.
      
      This patch also reorders struct rtl_sta_info to save a little space.
      
      Fixes: d76d65fd ("rtlwifi: fix broken VHT support")
      Reported-by: NDan Williams <dcbw@redhat.com>
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      73fb2705
  3. 07 3月, 2016 22 次提交