1. 06 Sep, 2018 14 commits
    • Carl Huang's avatar
      ath10k: download firmware via diag Copy Engine for QCA6174 and QCA9377. · 39501ea6
      Carl Huang authored
      Downloading firmware via BMI protocol takes too long time. For example,
      a ~700K bytes firmware takes about 500ms to download via BMI protocol.
      This is too long especially in suspend and resume scenario where firmware
      is re-downloaded unless WoWLAN is enabled. Downloading firmware via diag CE
      can reduce the time to ~40ms for a ~700K bytes firmware binary.
      
      Ath10k driver parses the firmware to segments and downloads the segments
      to the specified address directly. If the firmware is compressed or has
      unsupported segments, ath10k driver will try BMI download again.
      
      It's tested with QCA6174 hw3.2 and
      firmware-6.bin_WLAN.RM.4.4.1-00111-QCARMSWP-1. QCA9377 is also affected.
      Signed-off-by: default avatarCarl Huang <cjhuang@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      39501ea6
    • Carl Huang's avatar
      ath10k: support to access target space below 1M for qca6174 and qca9377 · bc346c9a
      Carl Huang authored
      To download firmware via diag interface, driver needs to write the target
      memory space below 1M. It means the bit20 should be zero for the converted
      address if the target memory space is below 1M. Otherwise, bit20 is one if
      the target address is larger or equal to 1M space.
      
      As downloading firmware via diag interface is only required for qca6174
      and qca9377, a new specific function is introduced to convert the target
      address to ce address: ath10k_pci_qca6174_targ_cpu_to_ce_addri().
      This function supports to convert any target address to ce address.
      
      It's tested with QCA6174 hw3.2 and
      firmware-6.bin_WLAN.RM.4.4.1-00111-QCARMSWP-1. QCA9377 is also affected.
      Signed-off-by: default avatarCarl Huang <cjhuang@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      bc346c9a
    • Carl Huang's avatar
      ath10k: optimize pci diag mem read & write operations · d56bbeea
      Carl Huang authored
      Delay 1ms is too long for both diag read and write operations.
      This is observed when writing a big memory buffer to target or
      reading a big memory buffer from target. Take writing/reading
      512k bytes as example, the delay itself is 256ms as the maximum
      length of every write/read is 2k size.
      
      Reduce the delay to 50us for read and write operations.
      
      Take the ath10k_pci_targ_cpu_to_ce_addr() out of loop and put it
      in the beginning of the loop for ath10k_pci_diag_read_mem().
      
      The ath10k_pci_targ_cpu_to_ce_addr() is to convert the address
      from target cpu's perspective to CE's perspective, so it makes
      no sense to convert a CE's perspective address again in the loop.
      It's a wrong implementation but happens to work.
      
      If the target address is below 1M space, then the convert in the loop
      from the second time becomes wrong because the previously converted address
      is larger than 1M. The counterpart ath10k_pci_diag_write_mem() has the
      correct implementation.
      
      With this change, ath10k_pci_diage_read_mem() works correctly no matter
      the target address is below 1M or above 1M.
      
      It's tested with QCA6174 hw3.2 and
      firmware-6.bin_WLAN.RM.4.4.1-00111-QCARMSWP-1. QCA9377 is also affected.
      Signed-off-by: default avatarCarl Huang <cjhuang@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      d56bbeea
    • Balaji Pothunoori's avatar
      ath10k: average ack rssi support for data frames · c7fd8d23
      Balaji Pothunoori authored
      Average ack rssi value is weighted average of ack rssi for
      no of msdu's has been sent.
      This feature is enabled by the host driver if firmware is capable.
      After receiving event from host, firmware allocates the necessary
      memory to store the ack_rssi for data packets during the init time.
      
      After each successful transmission, If tx completion status is OK
      and 24th bit is set in HTT message header then host will fetch the
      ack_rssi else host can ignore the ack_rssi field.
      Signed-off-by: default avatarBalaji Pothunoori <bpothuno@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      c7fd8d23
    • K.T.VIJAYAKUMAAR's avatar
      ath10k: avoid possible memory access violation · 97c69a70
      K.T.VIJAYAKUMAAR authored
      array "ctl_power_table" access index "pream" is initialized with -1 and
      is raised as a static analysis tool issue.
      [drivers\net\wireless\ath\ath10k\wmi.c:4719] ->
      [drivers\net\wireless\ath\ath10k\wmi.c:4730]: (error) Array index -1 is
      out of bounds.
      
      Since the "pream" index for accessing ctl_power_table array is initialized
      with -1, there is a chance of memory access violation for the cases below.
      1) wmi_pdev_tpc_final_table_event change frequency is between 2483 and 5180
      2) pream_idx is out of the enumeration ranges of wmi_tpc_pream_2ghz,
      wmi_tpc_pream_5ghz
      Signed-off-by: default avatarK.T.VIJAYAKUMAAR <vijay.bvb@samsung.com>
      [kvalo@codeaurora.org: clean up the warning message]
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      97c69a70
    • Anilkumar Kolli's avatar
      ath10k: add debugfs support to dump per sta tx stats · 85dd28eb
      Anilkumar Kolli authored
      This patch adds 'tx_stats' in per station debugfs entry.
      
      Use this command to dump tx_stats:
      cat /sys/kernel/debug/ieee80211/phy0/netdev\:wlan0/
          stations/<MACADDR>/tx_stats
      Signed-off-by: default avatarAnilkumar Kolli <akolli@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      85dd28eb
    • Anilkumar Kolli's avatar
      ath10k: add extended per sta tx statistics support · a904417f
      Anilkumar Kolli authored
      This patch adds per station tx statistics support.
      
      Per station tx stats include
       - pkts/bytes transmitted at all possible rates(mcs/nss/bw/gi).
       - ACK fails count
       - ampdu bytes/pkts transmitted at all possible rates(mcs/nss/bw/gi).
       - BA fails count
      
      Tested on QCA9984/QCA4019/QCA988x
      Firmware: 10.4-3.5.3-00057
      	  10.2.4-1.0-00037
      Signed-off-by: default avatarAnilkumar Kolli <akolli@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      a904417f
    • Anilkumar Kolli's avatar
      ath10k: add debugfs entry to enable extended tx stats · 348cd95c
      Anilkumar Kolli authored
      This patch adds debugfs entry to enable/disable extended
      tx statistics. Extended tx statistics are from peer stats
      feature.
      Signed-off-by: default avatarAnilkumar Kolli <akolli@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      348cd95c
    • Anilkumar Kolli's avatar
      ath10k: get the legacy rate index to update the txrate table · 0189dbd7
      Anilkumar Kolli authored
      Get the legacy rate index to update the pkts/bytes counter
      against each possible tx rate.
      Signed-off-by: default avatarAnilkumar Kolli <akolli@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      0189dbd7
    • Gustavo A. R. Silva's avatar
      wil6210: fix unsigned cid comparison with >= 0 · 49925f24
      Gustavo A. R. Silva authored
      The comparison of cid >= 0 is always true because cid is of type u8
      (8 bits, unsigned).
      
      Fix this by removing such comparison and updating the type of
      variable cid to u8 in the caller function.
      
      Addresses-Coverity-ID: 1473079 ("Unsigned compared against 0")
      Fixes: b9010f10 ("wil6210: add FT roam support for AP and station")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      49925f24
    • Govind Singh's avatar
      ath10k: enable pktlog for WCN3990 target · 713358c3
      Govind Singh authored
      WCN3990 target uses separate htc service for pktlog.
      Add pktlog service request and support for pktlog
      rx path handling.
      
      Testing:
          Tested on WCN3990 and QCA6174 HW.
          Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1,
                     WLAN.RM.4.4.1-00109-QCARMSWPZ-1
      Signed-off-by: default avatarGovind Singh <govinds@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      713358c3
    • Govind Singh's avatar
      ath10k: introduce CE_ATTR_POLL attribute for polling pipe · 9abcb937
      Govind Singh authored
      Existing copy engine interrupt enable logic assumes that last
      CE is using polling mode and due to this interrupt for last copy engine
      are always disabled. WCN3990 uses last CE for pktlog and
      interrupt remains disabled with existing logic.
      
      To mitigate this issue, introduce CE_ATTR_POLL flag and control
      the interrupt based on the flag which can be set in ce_attr.
      
      Testing:
          Tested on WCN3990 and QCA6174 HW.
          Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1,
                     WLAN.RM.4.4.1-00109-QCARMSWPZ-1
      Signed-off-by: default avatarGovind Singh <govinds@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      9abcb937
    • Sathishkumar Muruganandam's avatar
      ath10k: support extended board data download for dual-band QCA9984 · 31324d17
      Sathishkumar Muruganandam authored
      To support dual-band variant of QCA9984, new extended board data (eBDF)
      is introduced since existing board data ran out of space.
      
      Below is the brief implementation & design detail,
      ----------------------------------------------------
      
      1. New OTP changes to inform eBDF support in existing OTP download to
      fetch board ID and chip ID. This is backward compatible and older
      card sends 0 by default for eBDF support bit (bit 18 of OTP response) we
      check in ath10k driver.
      
      2. If eBDF is supported, then we need to fetch eBDF ID which is bundled
      in downloaded board data. So again OTP is executed for knowing the eBDF ID.
      This is done once we set 'board_data_initialized' bit. If eBDF ID
      returned is zero, we continue booting with previous board data downloaded.
      
      3. Based on the eBDF ID fetched, ath10k driver tries to download the
      extended board data to a new offset ahead of already downloaded board
      data address.
      
      4. A new BD IE type, ATH10K_BD_IE_BOARD_EXT is added to differentiate in
      bundling eBDF separately in board-2.bin and also to parse through
      board bundle for eBDF download in ath10k boot.
      
      5. If eBDF is not present in the board-2.bin bundle or when board ID is
      zero, we do a fallback boot to "eboard.bin" in the same QCA9984/hw1.0 dir.
      This is same as done to existing "board.bin" if board ID is not present
      in board-2.bin bundle.
      
      Current design is that eBDF size will be 2KB and eBDF ID will be
      byte value.
      
      Tested the above changes with dual-band variant of QCA9984 card. OTP
      update needed for the test will be part of next FW release 10.4-3.6-xxxx.
      
      Below are the logs with ath10k BOOT debugs enabled.
      
      First OTP response :
      ---------------------
      ..
      boot upload otp to 0x1234 len 9478 for board id
      boot get otp board id result 0x00040400 board_id 1 chip_id 0 ext_bid_support 1
      ..
      
      Second OTP response :
      ---------------------
      ..
      boot upload otp to 0x1234 len 9478 for ext board id
      boot get otp ext board id result 0x00000005 ext_board_id 5
      boot using eboard name 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5'
      ..
      
      Extended board data download:
      ------------------------------
      ..
      board name
      00000000: 62 75 73 3d 70 63 69 2c 62 6d 69 2d 63 68 69 70  bus=pci,bmi-chip
      00000010: 2d 69 64 3d 30 2c 62 6d 69 2d 65 62 6f 61 72 64  -id=0,bmi-eboard
      00000020: 2d 69 64 3d 35                                   -id=5
      boot found match for name 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5'
      boot found eboard data for 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5'
      using board api 2
      boot writing ext board data to addr 0xc3000
      ..
      
      Fallback Extended board data download from "eboard.bin":
      ---------------------------------------------------------
      ..
      board name
      00000000: 62 75 73 3d 70 63 69 2c 62 6d 69 2d 63 68 69 70  bus=pci,bmi-chip
      00000010: 2d 69 64 3d 30 2c 62 6d 69 2d 62 6f 61 72 64 2d  -id=0,bmi-board-
      00000020: 69 64 3d 31 30                                   id=10
      failed to fetch board data for bus=pci,bmi-chip-id=0,bmi-eboard-id=5 from ath10k/QCA9984/hw1.0/board-2.bin
      boot fw request 'ath10k/QCA9984/hw1.0/eboard.bin': 0
      using board api 1
      boot writing ext board data to addr 0xc3000
      ..
      Signed-off-by: default avatarSathishkumar Muruganandam <murugana@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      31324d17
    • Sathishkumar Muruganandam's avatar
      ath10k: refactoring needed for extended board data download · 5849ed48
      Sathishkumar Muruganandam authored
      Just moving functions down in the file, no functional changes.
      Signed-off-by: default avatarSathishkumar Muruganandam <murugana@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      5849ed48
  2. 03 Sep, 2018 4 commits
  3. 28 Aug, 2018 18 commits
  4. 27 Aug, 2018 2 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 050cdc6c
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) ICE, E1000, IGB, IXGBE, and I40E bug fixes from the Intel folks.
      
       2) Better fix for AB-BA deadlock in packet scheduler code, from Cong
          Wang.
      
       3) bpf sockmap fixes (zero sized key handling, etc.) from Daniel
          Borkmann.
      
       4) Send zero IPID in TCP resets and SYN-RECV state ACKs, to prevent
          attackers using it as a side-channel. From Eric Dumazet.
      
       5) Memory leak in mediatek bluetooth driver, from Gustavo A. R. Silva.
      
       6) Hook up rt->dst.input of ipv6 anycast routes properly, from Hangbin
          Liu.
      
       7) hns and hns3 bug fixes from Huazhong Tan.
      
       8) Fix RIF leak in mlxsw driver, from Ido Schimmel.
      
       9) iova range check fix in vhost, from Jason Wang.
      
      10) Fix hang in do_tcp_sendpages() with tls, from John Fastabend.
      
      11) More r8152 chips need to disable RX aggregation, from Kai-Heng Feng.
      
      12) Memory exposure in TCA_U32_SEL handling, from Kees Cook.
      
      13) TCP BBR congestion control fixes from Kevin Yang.
      
      14) hv_netvsc, ignore non-PCI devices, from Stephen Hemminger.
      
      15) qed driver fixes from Tomer Tayar.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (77 commits)
        net: sched: Fix memory exposure from short TCA_U32_SEL
        qed: fix spelling mistake "comparsion" -> "comparison"
        vhost: correctly check the iova range when waking virtqueue
        qlge: Fix netdev features configuration.
        net: macb: do not disable MDIO bus at open/close time
        Revert "net: stmmac: fix build failure due to missing COMMON_CLK dependency"
        net: macb: Fix regression breaking non-MDIO fixed-link PHYs
        mlxsw: spectrum_switchdev: Do not leak RIFs when removing bridge
        i40e: fix condition of WARN_ONCE for stat strings
        i40e: Fix for Tx timeouts when interface is brought up if DCB is enabled
        ixgbe: fix driver behaviour after issuing VFLR
        ixgbe: Prevent unsupported configurations with XDP
        ixgbe: Replace GFP_ATOMIC with GFP_KERNEL
        igb: Replace mdelay() with msleep() in igb_integrated_phy_loopback()
        igb: Replace GFP_ATOMIC with GFP_KERNEL in igb_sw_init()
        igb: Use an advanced ctx descriptor for launchtime
        e1000: ensure to free old tx/rx rings in set_ringparam()
        e1000: check on netif_running() before calling e1000_up()
        ixgb: use dma_zalloc_coherent instead of allocator/memset
        ice: Trivial formatting fixes
        ...
      050cdc6c
    • Jens Axboe's avatar
      Fix up libata MAINTAINERS entry · 908946c4
      Jens Axboe authored
      The email was botched in one entry, and I also forgot to update the
      location of the git tree. It'll be under the linux-block umbrella, just
      with different branches.
      Reported-by: default avatarBaruch Siach <baruch@tkos.co.il>
      Fixes: 7634ccd2 ("libata: maintainership update")
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      908946c4
  5. 26 Aug, 2018 2 commits