Commit Graph

3664 Commits

Author SHA1 Message Date
Jeff Johnson
616d1309d2 qcacmn: Rename enum tQDF_ADAPTER_MODE
The name tQDF_ADAPTER_MODE is a poor name on many levels:
-  The "t" prefix implies it is a typedef when it isn't.
-  The "t" prefix makes this a mixed-case identifier which is "frowned
   upon" in the Linux coding style guide.
-  The term "ADAPTER" is MCL-specific and is not suitable for
   converged code.

Therefore rename enum tQDF_ADAPTER_MODE to enum QDF_OPMODE to better
align with with the Linix coding style and the converged nomenclature.

Change-Id: I20f1b6d1a0ab4b8fe6a85cefdff96a49e2f4652c
CRs-Fixed: 2140295
2017-11-08 21:57:31 -08:00
Abhishek Singh
a0f242168c qcacmn: Changes to support DPP AKM
Adds cmn changes to support and parse AKM required for DPP.

Change-Id: I8efd4075f2c62500dbe11c2a6847f2dab2f31b34
CRs-Fixed: 2138461
2017-11-08 21:57:29 -08:00
Mukul Sharma
dc5672f760 qcacmn: Perform cleanup of send_init_cmd
Currently, WMI is exposing two command ops
(send_init_cmd and init_send_cmd) for init
command purpose which is leading to data/code
redundeancy. Perform clenaup for send_init_cmd.

Change-Id: I8f31ab45392cf2afb3cc34c633ba83ea42a3a835
CRs-Fixed: 2138507
2017-11-08 19:43:01 -08:00
Naveen Rawat
8aaf6f2653 qcacmn: Add WLAN_PEER_NDP peer type
Add WLAN_PEER_NDP peer type in 	enum wlan_peer_type

Change-Id: Ibb8a606ccfdcdefb5395e0da89c0b10dc8345320
CRs-Fixed: 2137430
2017-11-08 13:49:31 -08:00
Yun Park
4711ade7bb qcacmn: Fix memmory leak from dp_tx_ipa_uc_detach
IPA Tx buffers are allocated using qdf_mem_alloc_consistent,
so free using qdf_mem_free_consistent.

Change-Id: I0125189e1eec2a45f06bc7c2662d65c8745b3d3e
CRs-Fixed: 2135803
2017-11-08 11:41:00 -08:00
Karunakar Dasineni
a7ee2c65f7 qcacmn: WAR for wrong MSDU count in Rx descriptor
Due to a HW issue, msdu count received in REO entrance descriptor
could be wrong in case of some error packets received on RXDMA2SW
ring. Instead we should rely on Rx MSDU link descriptor entries
being non-null to pop MSDUs.

Change-Id: I1f4344752bdca13e9502aab79ee648b9b075d2e9
2017-11-08 07:41:28 -08:00
Karunakar Dasineni
87f0c5d850 qcacmn: Replenish Rx buffers on low threshold intr
Replenish buffers in RXDMA refill ring based on low threshold
interrupts in addition to regular Rx processing. Also increased
RXDMA refill ring size to 4096.

Change-Id: If1f4592c815fe2404c4952a96b721cb6d4fdfcd0
2017-11-08 07:41:26 -08:00
Arif Hussain
1f88428baf qcacmn: Replace instances of unadorned pointer reference in DFS
Replace all instances of %p with %pK in DFS component, so that
kernel pointers are hidden from unprivileged users.

Change-Id: Ia10971516bf962287af9ff8dce873888500a01a1
CRs-fixed: 2133321
2017-11-08 03:01:33 -08:00
Om Prakash Tripathi
d6eb35e9f2 qcacmn: Get WMI_SERVICE_THERM_THROT capability from FW
Host enables thermal throttle depending on FW capability.
Add support to read this capability from ext service ready.

Change-Id: Ifafc24deac0bac228c98750f54e95fdfa3377a6a
CRs-Fixed: 2128049
2017-11-08 03:01:30 -08:00
Anirban Sirkhell
101b8b4cde qcacmn: Add vdev param to enable/disable buffering of mcast frames
Add WMI vdev param to indicate firmware not to buffer mcast frames
even when clients are in power-save.

CRs-Fixed: 2133095
Change-Id: I4fe936e6a490ec8007f909e1ba079bec2f2713cd
2017-11-08 03:01:28 -08:00
Krunal Soni
0087818a25 qcacmn: Fix to propagate key-receiver-sequence-counter to WMI
SME module propagates KeyRSC to MAC/PE module but MAC/PE doesn't
pass this counter to WMA and due to which WMA is not able pass to
WMI module.

Add a fix to propagate KeyRSC field from MAC to WMA module and
WMA to WMI module.

CRs-Fixed: 2130765
Change-Id: I0de6907bf8aa159eccb1d8310e7027f8fdf19fff
2017-11-07 22:56:36 -08:00
Yun Park
88e0b95564 qcacmn: Remove local queue from send_packet_completion
Static analys complains about the htc_pkt having a pointer
to the local queue when the function returned.  Remove the
local queue so that it is not an issue.

Requires epping to support individual single completions.

Change-Id: I8f96420f5f6305c43051a21073607cdd6c603855
CRs-Fixed: 2125394
2017-11-07 17:43:31 -08:00
Dustin Brown
231f929686 qcacmn: Add QDF cpu hotplug APIs
Currently, there are two consumers of the Linux kernel CPU hotplug APIs.
Besides being problematic for not being operating system agnostic,
different versions of the Linux kernel export different CPU hotplug
APIs. In order to consolidate the various abstractions for different
operating systems and API versions, create a CPU hotplug abstraction in
QDF.

Change-Id: Ib17c6e3ed3a87a90a82d909a6c493360cab27855
CRs-Fixed: 2132632
2017-11-07 13:42:43 -08:00
Pamidipati, Vijay
3379c74969 qcacmn: Fix descriptor leak issue in DP
In the DMA descriptor reap code, the check for NAPI quota is after
Tail pointer is updated. This is causing a descriptor leak in high load
conditions when loop is exited without processing the reaped descriptor.
This change moves the quota check to end of while loop.

Change-Id: I2f3432bf257947f85abc2216a0f2dfc44813c44c
CRs-Fixed: 2137017
2017-11-07 09:38:11 -08:00
bings
be998d8c2d qcacmn: Free sdio hif device when hif_device_inserted fails
hif_device_inserted may be failed when installing sdio wlan module,
which causes memory leak.

To fix this memory leak, free the hif_sdio_dev and its related DMA
buffers when sdio driver fails in hif_device_inserted.

Change-Id: I6ee53cd2a55fbb1492c66caa260ba8b3681526e6
CRs-Fixed: 2131539
2017-11-07 00:01:53 -08:00
Naveen Rawat
761329bbf2 qcacmn: Do not start unmap timer if send cmd to FW fails
Do not start unmap timer if peer delete couldn't be sent to
firmware.

Change-Id: Ie746bde046b76d8e136ebb4fd0b60088bf516d42
CRs-Fixed: 2116223
2017-11-06 21:52:16 -08:00
Wu Gao
2bb999c91a qcacmn: Fix memory leak in P2P component
Due to race condition, there is memory leak in P2P component. Free
buffer in error scenarios.

Change-Id: I5baf77ec0d0d2f3aea9da5fcca9105dc2c60c3d0
CRs-Fixed: 2136089
2017-11-06 19:21:28 -08:00
Poddar, Siddarth
0a1742186a qcacmn: Add vendor attribute to set/get wifi configuration
Add vendor attribute for data used by
VENDOR_SUBCMD_SET_WIFI_CONFIGURATION and
VENDOR_SUBCMD_GET_WIFI_CONFIGURATION subcommands.

Change-Id: If64da28c040868d5b42af202c647251db1a684c0
CRs-Fixed: 2137081
2017-11-06 19:21:26 -08:00
Basamma Yakkanahalli
51ddfbcbee qcacmn: iwpriv txrx_fw_stats support halphy stats
Added TXRX_FW_HALPHY_STATS to support txrx_fw_stats
for halphy stats.

Change-Id: I93a9c9e3199c7c163cd6e93d28acb4e757c1e3eb
CRs-Fixed: 2114152
2017-11-06 00:50:50 -08:00
Surabhi Vishnoi
6f752b487b qcacmn: Check target address boundary before access
Athdiag procfs entry does not have address sanity check, this is
resulting in invalid ioread32/iowrite32 if out of PCIE BAR address
is used.

Fix this by allowing address with in PCIE BAR range.

Change-Id: I8365eacca7ccc4f489b7d0bda6c998384d0fec7b
CRs-Fixed: 2112270
2017-11-05 20:37:06 -08:00
Zhu Jianmin
5b55c8e857 qcacmn: wlan_serialization_activate_cmd activates first cmd only
wlan_serialization_activate_cmd() always activates first command from
active queue which creates issue for scan command related operations.
This issue has been brought in through:
I8c63dd15d7ab8612a87950a3c189e73d1436c26a
When there are multiple scan commands put in to active queue,
wlan_serialization_activate_cmd() will keep pulling first command and
activates it.
Fix: Enhance wlan_serialization_activate_cmd() API to activate the
command which has been put in a active queue.

Change-Id: Id72449cbee81b65977070a8bbec8e417eb2bb655
CRs-Fixed: 2136142
2017-11-05 18:38:36 -08:00
Abhijit Pradhan
7383ef9d7e qcacmn: Fix compilation issues for DFS component disable/enable
Header files are included in appropriate places to avoid compilation
errors. To disable/enable DFS component from non-common code at
compile time, use macro QCA_DFS_COMPONENT_ENABLE in config  file.

Change-Id: I0d4fe27ee0d76412c109aa3f64485ea1ac2a5e3a
CRs-Fixed: 2134355
2017-11-05 04:45:51 -08:00
Tushnim Bhattacharyya
17a90d0b7d qcacmn: Stop the opportunistic timer when hdd stop happens
Stop the opportunistic timer & take action if needed when hdd stop
happens. Also, take action when set_hw_mode request to FW times out.

Change-Id: I32f1e38e93a5805e0d85b800cc4e070cd6f79669
CRs-Fixed: 2133388
2017-11-04 06:59:56 -07:00
Shashikala Prabhu
0ea0a2466e qcacmn: Add random channel debug bit mask
Add WLAN_DEBUG_DFS_RANDOM_CHAN bit mask to enable/disable
random channel algorithm prints using DFS logging.

Change-Id: I77f01afcf59b8b790404eca8caa68c150a5d3ec2
CRs-Fixed: 2120265
2017-11-04 06:59:54 -07:00
Shashikala Prabhu
2427663f1f qcacmn: Cleanup old random channel function
Removed WIN based random channel selection algorithm.
To choose a new random channel, use converged random
channel  algorithm.

Change-Id: I0ece0cb71ffeb694c9f5264d97a25e49d59b1ae8
CRs-Fixed: 2120265
2017-11-04 06:59:52 -07:00
Shashikala Prabhu
68431d3ea5 qcacmn: Add support to use new random channel algorithm
1) Add support to use new random channel selection algorithm
   from converged DFS component.

2) Move random channel filtering flags from dfs_internal.h to
   dfs_ioctl.h as these flags are common between MLME and DFS
   component.

Change-Id: I5ef789dd9e9c28706f1c581997a646a80caec5ee
CRs-Fixed: 2120265
2017-11-04 06:59:50 -07:00
Ganesh Kondabattini
1b30f135af qcacmn: Set weight of DFS/passive channels in pcl to 0
If force SCC is set and SAP is active then all DFS/disabled
channels in PCL should have 0 weight to avoid the STA roaming
to these channels.

Change-Id: I4519c29477c5108f5131b7caa806505b69efea8b
CRs-Fixed: 2135750
2017-11-04 06:09:13 -07:00
Soumya Bhat
606fb3902c qcacmn: Parse received PPDU stats TLV appropriately
num_msdu, qos and ppdu_type were being parsed incorrectly.
Parse them appropriately.

Change-Id: I665285bc0b628fd1d9459473d18ef62577bbd54e
CRs-Fixed: 2133732
2017-11-04 06:09:11 -07:00
Abhijit Pradhan
c5fc03dc59 qcacmn: Fix DFS component KW issues
Fix KW issues for DFS component.

Change-Id: I9285c79e33f637d99c765e76dff35609235f1255
CRs-Fixed: 2136241
2017-11-04 06:09:09 -07:00
Shashikala Prabhu
679a8798c4 qcacmn: Fix Regulatory component KW issues
Fix Regulatory component KW issues.

Change-Id: I818913cc5e4dfc49e110e8fbe4d7a56c23508b7d
CRs-Fixed: 2136241
2017-11-04 06:09:07 -07:00
c_cgodav
bd9ecaee84 qcacmn: Add enum for ACS Ranking iwpriv
Added iwpriv ENUM for ACS Ranking feature enable/disable

Change-Id: I7a7289f458adacb7890bfbdbdaf5528c4016a7c0
2017-11-04 06:09:05 -07:00
Sathish Kumar
322b4cb4c5 qcacmn: Add support for periodic chan stats config command
Add support for sending periodic chan stats config command to target. Once
configured, host will receive the channel stats periodically as per the
configured period

Change-Id: Ic2b4692d0e2662ca590b925732f6cb33aac7a6de
CRs-Fixed: 2136759
2017-11-03 15:58:53 -07:00
Zhu Jianmin
2255930af5 qcacmn: Fix logic and no return issue in wlan_serialization_stop_timer
wlan_serialization_timer can't be stopped before destroy it
always log: wlan_serialization_stop_timer: nothing to stop
No return in end of function

Change-Id: Ie40d8513ab5d7e84f21aebe720365d32b8205ea9
CRs-Fixed: 2133196
2017-11-02 05:48:37 -07:00
Kiran Kumar Lokere
584e6617ca qcacmn: Enable scan mac randomization if user cfg is set
Enable scan randomization only if gEnableMacAddrSpoof
configuration is enabled

Change-Id: I1b9accb7fe1049ee6c5dda2a4f5920c0908196ff
CRs-Fixed: 2104796
2017-11-01 14:39:19 -07:00
Zhu Jianmin
959cb86f82 qcacmn: Fix stability caused by unwanted recursive calls in serialization
Issue description: When wlan_serialization_dequeue_cmd() gets called, it
will remove the command from active queue and try to move next pending
command from pending queue to active queue. But before it moves this
pending command to active queue completly, it calls the caller and
notify that command is activated through callback.
If that callback returns failure then serialization abandon the process
of moving it from pending to active. Now it again picks the same command
from pending and repeat the process. This creates unwanted recursion and
reference count mistakenly decremented multiple times.

Here is the recursion stack:
  (a) wlan_serialization_move_pending_to_active()
    (b) wlan_serialization_enqueue_cmd
      (c) wlan_serialization_add_cmd_to_given_queue
        (d) cmd_list->cmd.cmd_cb() fails
          (e) wlan_serialization_put_back_to_global_list
            (f) go back to (a) and repeat
Fix: Divide wlan_serialization_enqueue_cmd() API's logic in 2 parts.
1) Enqueue the command first through wlan_serialization_enqueue_cmd()
   This ensures that command has been put in to given queue.
2) Once command has been put in to given queue and if this queue happen
   to be active queue then activate the command through
   wlan_serialization_activate_cmd()
Here is the stack after the fix:
  (a) wlan_serialization_move_pending_to_active()
    (b) wlan_serialization_enqueue_cmd
      (c) wlan_serialization_add_cmd_to_given_queue
        (d) returns WLAN_SER_CMD_ACTIVE or !WLAN_SER_CMD_ACTIVE
  (a1) if (WLAN_SER_CMD_ACTIVE)
    (b1) wlan_serialization_put_back_to_global_list() for pending cmd
      (c1) wlan_serialization_activate_cmd()
        (d1) if fail
          (e1) wlan_serialization_put_back_to_global_list for active cmd
             (f1) then repeat from (a)
        (d2) if pass then return
  (a2) if (!WLAN_SER_CMD_ACTIVE) then nothing to be done.

Change-Id: I8c63dd15d7ab8612a87950a3c189e73d1436c26a
CRs-Fixed: 2132975
2017-11-01 14:39:17 -07:00
Dustin Brown
bbba9176f8 qcacmn: Set the initial wake flag on MSI resume
When the wlan driver is suspending, the last thing it does is check to
see if the firmware has indicated a wakeup during the suspend process.
This is done by checking the initial wakeup flag, which is set when a
specific copy engine payload is received from firmware. For the new
dedicated wake MSI, only the wake signal is received, no payload. When
the wake MSI is toggled, set the initial wakeup flag to prevent race
conditions during the suspend process.

Change-Id: Id53cc7884431a437136d8dca068449bc5a25b87c
CRs-Fixed: 2133469
2017-11-01 13:57:00 -07:00
Rajeev Kumar Sirasanagandla
b851d10868 qcacmn: Add support to query RCPI info
RCPI is measure of received RF power in the selected channel for a
received frame and is measured at the antenna connector and shall be
measured over an entire frame. It is a monotonically increasing,
logarithmic function of received power level.

Wlan firmware computes RCPI.

Add host support to query firmware for RCPI information of
peer mac address in sta, p2p client, softap and p2p go modes.

Change-Id: I27fe45e993bd9b157fe33ca08a56330c1c950d16
CRs-Fixed: 1093187
2017-11-01 13:56:58 -07:00
Paul Zhang
52ae099d0b qcacmn: Inc the peer->peer_objmgr.ref_cnt in time
There is a race condition: during the peer is created and invoking
qdf_atomic_inc to increase the ref_cnt, another thread may firstly
use it by wlan_objmgr_peer_get_ref and wlan_objmgr_peer_release_ref.
Then wlan_objmgr_peer_obj_destroy was called and WLAN_OBJMGR_BUG(0)
happens.

Change-Id: Ic15bada7c70d799f808fe980ae52d4862789fe11
CRs-Fixed: 2133929
2017-11-01 13:56:56 -07:00
Paul Zhang
66698093e1 qcacmn: fix spinlock paring issue
spin_lock/spin_unlock is not pairing.

Change-Id: Ib2cb73f542deee8bf4217daa731af49d07eaf7be
CRs-Fixed: 2105081
2017-11-01 13:17:26 -07:00
Manjunathappa Prakash
449a2a0425 qcacmn: Separate TcpDelAck and TcpAdvWinScale
Separate tcp-delayed-ack and tcp-advanced-window-scaling triggers
so that these system parameters can be set separately.

Change-Id: If2f869243152e698409e8a38459f5fabe44f35cb
CRs-Fixed: 2133069
2017-10-31 17:39:11 -07:00
Deepak Dhamdhere
7e0b8ba31a qcacmn: Create roam debug log infrastructure
Add a circular buffer to hold roaming related debug log information
for peer and vdev operations in the driver. Purpose is to dump
this information after host or target crash. 256 entries will go
back much deeper into history than dmesg or wlan driver logs found
in crashScope. Information is dumped out as error messages from
crash detection points as necessary.

The support routines help to store the debug logs and dump them,
typically after peer related timeout or assert.

wlan_roam_next_debug_log_index () - Utility routine to compute next index
wlan_roam_debug_log() - Adds a log entry
wlan_roam_debug_string() - Returns debug log type string
wlan_roam_debug_dump() - Dump all wlan roam debug log records

Add new QDF module ID QDF_MODULE_ID_ROAM_DEBUG.

CRs-Fixed: 1116078
Change-Id: If2077f560405ec0414d08ef4ece0fb0d2db2ccc7
2017-10-31 17:39:09 -07:00
c_manjee
dce1481493 qcacmn: Send Grat-ARP Keep Alive request to FW
Setting Gratious ARP request through iwpriv command is
not supported.

Add condition to set Gratious ARP request as method in
Keep Alive functionality

CRs-Fixed: 1114602
Change-Id: I299d39131e7ab0ebae6bd10f41bc4549debda048
2017-10-31 17:39:07 -07:00
Amar Singhal
287c86433e qcacmn: Check for buffer overflow for diag messages
Check for buffer overflow from diag messages.

Change-Id: I5ff85b24b0e26393343dc4cc4c41a9f84e6ba8e9
CRs-Fixed: 2129586
2017-10-31 17:39:04 -07:00
chenguo
23b6502d88 qcacmn: Fix memory leak for RX path of SDIO WLAN
There is a memory leak for RX path of SDIO WLAN if skb allocation
fails. Add condition check and free all resources for scenario.

Change-Id: Ic4a58d3d4e93f1d6d57bfb045dfdeb131b24f72a
CRs-Fixed: 2128051
2017-10-31 17:39:02 -07:00
Poddar, Siddarth
9f7b297a38 qcacmn: Remove code related to mmap functionality for pktlog
Remove the code related to mmap functionality for pktlog
as it is no longer used/required.

Change-Id: Ib031148985055201810a7c32347c2e6efea57f35
CRs-Fixed: 2133878
2017-10-30 07:38:07 -07:00
Sarada Prasanna Garnayak
e9f0e9c77f qcacmn: add device pointer in pld snoc API
Add device pointer in all pld snoc API to support
for numerous WLAN module.

Change-Id: I2e3a296d9b40f14633e0f6e1ed6392536d854552
2017-10-30 05:38:26 -07:00
Soumya Bhat
d34799deb2 qcacmn: Add EXT NSS Signaling support for legacy platform
Add EXT NSS Signaling support and related defintions for
legacy support

Change-Id: I332098cd681080316a7f4c03415cf68ae69f2549
CRs-Fixed: 2122207
2017-10-30 05:38:24 -07:00
Poddar, Siddarth
658455b413 qcacmn: Restrict max/min pktlog buffer size using pktlogconf tool
Restrict the pktlog buffer size to a minimum of 1MB and maximum
of 16MB using pktlogconf tool or through sysctl command.

Change-Id: I1c67ed724c512f57c5d6e555be14b0b0e23d203f
CRs-Fixed: 2133723
2017-10-30 03:25:50 -07:00
Edayilliam Jayadev
a9919d6e12 qcacmn: Changes to wext interface for external acs
Private ioctls for external acs operation like
set icm active, get channel load info, clear chan load info,
get nominal noise floor were transported and
handled by spectral module. We seperate this ioctls
from spectral by adding new IWPRIVs(get_icm_active,
set_icm_active, get_nominal_nf, clear_chan_info)and
moving their handlers out of spectral.

CRs-Fixed: 2126313
Change-Id: I8c6b56b85d566f5bc7f6217f6fbc99fa23171cdd
2017-10-30 01:39:07 -07:00
Gyanranjan Hazarika
409dc097be qcacmn: Enable sending vdev-param HEOP to target
It is required to send vdev-param HEOP to the target with
updated bss-color to enable HE BSS Color feature. Add
necessary code to support this.

Change-Id: I826bc5387dad8d044abcbc9cbdf69e93b59beb39
CRs-fixed: 2126605
2017-10-29 15:25:23 -07:00