1. 14 Dec, 2017 14 commits
    • Rakesh Pillai's avatar
      ath10k: wmi: add hw params entry for wcn3990 · 03a72288
      Rakesh Pillai authored
      Add hw params entry for wcn3990 and populate various
      target specific values for wcn3990.
      Signed-off-by: default avatarRakesh Pillai <pillair@qti.qualcomm.com>
      Signed-off-by: default avatarGovind Singh <govinds@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      03a72288
    • Rakesh Pillai's avatar
      ath10k: wmi: get wmi init parameter values from hw params · 9f2992fe
      Rakesh Pillai authored
      The parameter values for skid limit, number of peers and wds
      entries values which are sent in wmi init cmd are hardware
      specific.
      
      Add support to obtain skid limit, number of peers and wds entries
      values from hw params which will have the hw specific values
      for these parameters.
      Signed-off-by: default avatarRakesh Pillai <pillair@qti.qualcomm.com>
      Signed-off-by: default avatarGovind Singh <govinds@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      9f2992fe
    • Rakesh Pillai's avatar
      ath10k: wmi: add management tx by reference support over wmi · 1807da49
      Rakesh Pillai authored
      HL1.0 firmware branch, used in wcn3990, transmits management
      frames by reference over WMI.
      
      Add support for management tx by reference over WMI.
      Signed-off-by: default avatarRakesh Pillai <pillair@qti.qualcomm.com>
      Signed-off-by: default avatarGovind Singh <govinds@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      1807da49
    • Rakesh Pillai's avatar
      ath10k: wmi: modify svc bitmap parsing for wcn3990 · 229329ff
      Rakesh Pillai authored
      Due to the limitation of wmi tlv parsing logic, if there are
      two parameters in a wmi event with same tlv tag, we can get only
      the last value, as it overwrites the prev value of the same tlv tag.
      
      The service ready event in wcn3990 contains two parameters of the
      same tag UINT32, due to which the svc bitmap is overwritten with the
      DBS support parameter.
      
      Refactor the service ready event parsing to allow parsing two tlv
      of the same tag UINT32 for wcn3990.
      Signed-off-by: default avatarRakesh Pillai <pillair@qti.qualcomm.com>
      Signed-off-by: default avatarGovind Singh <govinds@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      229329ff
    • Bjorn Andersson's avatar
      wcn36xx: Reduce spinlock in indication handler · 6d1f3732
      Bjorn Andersson authored
      The purpose of pushing indication on a list and handle these in a
      separate worker is to allow the handlers to sleep. It does therefor not
      make much sense to hold the queue spinlock through the entire indication
      worker function.
      
      By removing items from the queue early we don't need to hold the lock
      throughout the indication worker, allowing the individual handlers to
      sleep.
      Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      6d1f3732
    • Dan Carpenter's avatar
      ath9k_htc: Add a sanity check in ath9k_htc_ampdu_action() · 413fd2f5
      Dan Carpenter authored
      Smatch generates a warning here:
      
          drivers/net/wireless/ath/ath9k/htc_drv_main.c:1688 ath9k_htc_ampdu_action()
          error: buffer overflow 'ista->tid_state' 8 <= 15
      
      I don't know if it's a real bug or not but the other paths through this
      function all ensure that "tid" is less than ATH9K_HTC_MAX_TID (8) so
      checking here makes things more consistent.
      
      Fixes: fb9987d0 ("ath9k_htc: Support for AR9271 chipset.")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      413fd2f5
    • Loic Poulain's avatar
      wcn36xx: Add hardware scan offload support · 2f3bef4b
      Loic Poulain authored
      Current hw_scan implementation does not trigger offloaded
      hardware scan and seems to only put the device in a kind of
      listening mode (beacon/probe-response) for software scan.
      Since no probe request are generated by the software, current
      scanning method is similar to a passive scan.
      
      This patch introduces support for 'true' hardware offloaded scan.
      Hardware scan is configured and started via the start-scan-offload
      firmware message. Once scan has been completed a scan indicator
      message is received from firmware.
      
      Moreover, this patch includes support for directed probe-request,
      allowing connection with hidden APs. It also fixes scan issues with
      band-steering AP which are not 'visible' with passive scan (due to
      hidden ssid in beacons).
      
      Let's keep the 'legacy' scanning method in case scan-offload is not
      supported.
      Signed-off-by: default avatarLoic Poulain <loic.poulain@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      2f3bef4b
    • Sven Eckelmann's avatar
      ath10k: search DT for qcom,ath10k-calibration-variant · d06f26c5
      Sven Eckelmann authored
      Board Data File (BDF) is loaded upon driver boot-up procedure. The right
      board data file is identified on QCA4019 using bus, bmi-chip-id and
      bmi-board-id.
      
      The problem, however, can occur when the (default) board data file cannot
      fulfill with the vendor requirements and it is necessary to use a different
      board data file.
      
      This problem was solved for SMBIOS by adding a special SMBIOS type 0xF8.
      Something similar has to be provided for systems without SMBIOS but with
      device trees. No solution was specified by QCA and therefore a new one has
      to be found for ath10k.
      
      The device tree requires addition strings to define the variant name
      
          wifi@a000000 {
          	status = "okay";
          	qcom,ath10k-calibration-variant = "RT-AC58U";
          };
      
          wifi@a800000 {
          	status = "okay";
          	qcom,ath10k-calibration-variant = "RT-AC58U";
          };
      
      This would create the boarddata identifiers for the board-2.bin search
      
       *  bus=ahb,bmi-chip-id=0,bmi-board-id=16,variant=RT-AC58U
       *  bus=ahb,bmi-chip-id=0,bmi-board-id=17,variant=RT-AC58U
      Signed-off-by: default avatarSven Eckelmann <sven.eckelmann@openmesh.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      d06f26c5
    • Sven Eckelmann's avatar
      dt: bindings: add new dt entry for ath10k calibration variant · 40fb0eab
      Sven Eckelmann authored
      The bus + bmi-chip-id + bmi-board-id is not enough to identify the correct
      board data file on QCA4019 based devices. Multiple different boards share
      the same values. Only the original reference designs can currently be
      identified and loaded from the board-2.bin. But these will not result in
      the correct calibration data when combined with the pre-calibration data
      from the device.
      
      An additional "variant" information has to be provided (via SMBIOS or DT)
      to select the correct board data for a design which was modified by an ODM.
      Signed-off-by: default avatarSven Eckelmann <sven.eckelmann@openmesh.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      40fb0eab
    • Anilkumar Kolli's avatar
      ath10k: add per peer tx stats support for 10.2.4 · e8123bb7
      Anilkumar Kolli authored
      10.2.4 firmware branch (used in QCA988X) does not support
      HTT_10_4_T2H_MSG_TYPE_PEER_STATS and that's why ath10k does not provide
      tranmission rate statistics to user space, instead it just shows
      hardcoded 6 Mbit/s. But pktlog firmware facility provides per peer tx
      statistics. The firmware sends one pktlog event for every four
      PPDUs per peer, which include:
      
      * successful number of packets and bytes transmitted
      * number of packets and bytes dropped
      * retried number of packets and bytes
      * rate info per ppdu
      
      Firmware supports WMI_SERVICE_PEER_STATS, pktlog is enabled through
      ATH10K_FLAG_PEER_STATS, which is nowadays enabled by default in ath10k.
      
      This patch does not impact throughput.
      
      Tested on QCA9880 with firmware version 10.2.4.70.48. This should also
      work with firmware branch 10.2.4-1.0-00029
      
      Parse peer stats from pktlog packets and update the tx rate information
      per STA. This way user space can query about transmit rate with iw:
      
      $iw wlan0 station dump
      Station 3c:a9:f4:72:bb:a4 (on wlan1)
              inactive time:  8210 ms
              rx bytes:       9166
              rx packets:     44
              tx bytes:       1105
              tx packets:     9
              tx retries:     0
              tx failed:      1
              rx drop misc:   3
              signal:         -75 [-75, -87, -88] dBm
              signal avg:     -75 [-75, -85, -88] dBm
              tx bitrate:     39.0 MBit/s MCS 10
              rx bitrate:     26.0 MBit/s MCS 3
              rx duration:    23250 us
              authorized:     yes
              authenticated:  yes
              associated:     yes
              preamble:       short
              WMM/WME:        yes
              MFP:            no
              TDLS peer:      no
              DTIM period:    2
              beacon interval:100
              short preamble: yes
              short slot time:yes
              connected time: 22 seconds
      Signed-off-by: default avatarAnilkumar Kolli <akolli@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      e8123bb7
    • Anilkumar Kolli's avatar
      ath10k: move pktlog_filter out of ath10k_debug · 7f9befbb
      Anilkumar Kolli authored
      Move pktlog_filter from struct ath10k_debug to struct ath10k
      so that pktlog can be enabled even when debugfs is not
      enabled, needed to enable peer tx stats for 10.2.4.
      
      No changes in functionality.
      Signed-off-by: default avatarAnilkumar Kolli <akolli@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      7f9befbb
    • Anilkumar Kolli's avatar
      ath10k: remove MAC80211_DEBUGFS dependency on ath10k_sta_statistics · 6a7f8911
      Anilkumar Kolli authored
      Remove CONFIG_MAC80211_DEBUGFS dependency on ath10k_sta_statistics().
      ath10k_sta_statistics() has per sta tx/rx stats and this should not
      be dependent on MAC80211_DEBUGFS.
      
      No changes in functionality.
      Signed-off-by: default avatarAnilkumar Kolli <akolli@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      6a7f8911
    • Rajkumar Manoharan's avatar
      ath10k: unify rx processing in napi_poll · deba1b9e
      Rajkumar Manoharan authored
      With current NAPI implementation, NAPI poll can deliver more frames
      to net core than allotted budget. This may cause warning in napi_poll.
      Remaining quota is not accounted, while processing amsdus in
      rx_in_ord_ind and rx_ind queue. Adding num_msdus at last can not
      prevent delivering more frames to net core. With this change,
      all amdus from both in_ord_ind and rx_ind queues are processed and
      enqueued into common skb list instead of delivering into mac80211.
      Later msdus from common queue are dequeued and delivered depends on
      quota availability. This change also simplifies the rx processing in
      napi poll routine.
      Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      deba1b9e
    • Balaji Pothunoori's avatar
      ath10k: handling qos at STA side based on AP WMM enable/disable · 07ffb449
      Balaji Pothunoori authored
      Data packets are not sent by STA in case of STA joined to
      non QOS AP (WMM disabled AP). This is happening because of STA
      is sending data packets to firmware from host with qos enabled
      along with non qos queue value(TID = 16).
      Due to qos enabled, firmware is discarding the packet.
      
      This patch fixes this issue by updating the qos based on station
      WME capability field if WMM is disabled in AP.
      
      This patch is required by 10.4 family chipsets like
      QCA4019/QCA9888/QCA9884/QCA99X0.
      Firmware Versoin : 10.4-3.5.1-00018.
      
      For 10.2.4 family chipsets QCA988X/QCA9887 and QCA6174 this patch
      has no effect.
      Signed-off-by: default avatarBalaji Pothunoori <bpothuno@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      07ffb449
  2. 07 Dec, 2017 6 commits
  3. 02 Dec, 2017 17 commits
  4. 30 Nov, 2017 3 commits
    • Linus Walleij's avatar
      Documentation: net: dsa: Cut set_addr() documentation · 0fc66ddf
      Linus Walleij authored
      This is not supported anymore, devices needing a MAC address
      just assign one at random, it's just a driver pecularity.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0fc66ddf
    • David S. Miller's avatar
      Merge branch 'net-dst_entry-shrink' · 3d8068c5
      David S. Miller authored
      David Miller says:
      
      ====================
      net: Significantly shrink the size of routes.
      
      Through a combination of several things, our route structures are
      larger than they need to be.
      
      Mostly this stems from having members in dst_entry which are only used
      by one class of routes.  So the majority of the work in this series is
      about "un-commoning" these members and pushing them into the type
      specific structures.
      
      Unfortunately, IPSEC needed the most surgery.  The majority of the
      changes here had to do with bundle creation and management.
      
      The other issue is the refcount alignment in dst_entry.  Once we get
      rid of the not-so-common members, it really opens the door to removing
      that alignment entirely.
      
      I think the new layout looks really nice, so I'll reproduce it here:
      
      	struct net_device       *dev;
      	struct  dst_ops	        *ops;
      	unsigned long		_metrics;
      	unsigned long           expires;
      	struct xfrm_state	*xfrm;
      	int			(*input)(struct sk_buff *);
      	int			(*output)(struct net *net, struct sock *sk, struct sk_buff *skb);
      	unsigned short		flags;
      	short			obsolete;
      	unsigned short		header_len;
      	unsigned short		trailer_len;
      	atomic_t		__refcnt;
      	int			__use;
      	unsigned long		lastuse;
      	struct lwtunnel_state   *lwtstate;
      	struct rcu_head		rcu_head;
      	short			error;
      	short			__pad;
      	__u32			tclassid;
      
      (This is for 64-bit, on 32-bit the __refcnt comes at the very end)
      
      So, the good news:
      
      1) struct dst_entry shrinks from 160 to 112 bytes.
      
      2) struct rtable shrinks from 216 to 168 bytes.
      
      3) struct rt6_info shrinks from 384 to 320 bytes.
      
      Enjoy.
      
      v2:
      	Collapse some patches logically based upon feedback.
      	Fix the strange patch #7.
      
      v3:	xfrm_dst_path() needs inline keyword
      	Properly align __refcnt on 32-bit.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d8068c5
    • David Miller's avatar
      net: Remove dst->next · 7149f813
      David Miller authored
      There are no more users.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      7149f813