Commit Graph

16801 Commits

Author SHA1 Message Date
Bala Venkatesh
42e07eac72 qcacld-3.0: Avoid NULL pointer access
In function wlan_hdd_set_sap_csa_reason, sap_ctx pointer is
dereferenced without NULL check.

Add NULL check to avoid null pointer access.

Change-Id: I74bbfdcae6d5a06d5eaf0cd66e3ff9c3380c6bb0
CRs-Fixed: 2512034
2019-08-21 05:29:46 -07:00
nshrivas
e368d10bf1 Release 5.2.0.145B
Release 5.2.0.145B

Change-Id: Ibd9a6b475733f52b68c6ff0b03d3273e274891b7
CRs-Fixed: 774533
2019-08-21 00:06:02 -07:00
Subrat Dash
b1e61b2083 qcacld-3.0: Add support for gpio based strobe to capture tsf
Add configuration for gpio pin used to send strobe to wlan hw.

The host driver will latch the current time and toggle the gpio
to generate a strobe to wlan hw.

The tsf will be latched on detecting the strobe and it will be
made available in a register for sw access.
The wlan fw will read this tsf and report it to driver using tsf event.

Change-Id: I4365d97d22836ddbbd2bf9913d4f723e5a870369
CRs-Fixed: 2495152
2019-08-21 00:06:01 -07:00
nshrivas
bcb1a96d5a Release 5.2.0.145A
Release 5.2.0.145A

Change-Id: I9ef4d261410d20fd30a2970f82be0c757ad31862
CRs-Fixed: 774533
2019-08-20 22:53:50 -07:00
Abhishek Singh
682cf6f843 qcacld-3.0: Fix WMI timeout for runtime PM
For runtime PM if the bus is suspended driver need to consider
extra 6 sec time for bus resume.
Thus add 6 sec extra in WMI timeouts if runtime PM is supported.

Change-Id: I5515cc889a0315382bac11a33ea6f901b7af1c46
CRs-Fixed: 2507029
2019-08-20 22:53:50 -07:00
nshrivas
35d3347505 Release 5.2.0.145
Release 5.2.0.145

Change-Id: I8b170cf2c62625d665c2d46e9cfc1215110f2ba5
CRs-Fixed: 774533
2019-08-20 20:26:36 -07:00
Alan Chen
3018129b66 qcacld-3.0: Complete the wait for event if register driver fails
Complete the wait for event if register driver fails during insmod.

Change-Id: I1855d7304b63a926e328c8713a317d6be2b22d0e
CRs-Fixed: 2512236
2019-08-20 20:26:35 -07:00
nshrivas
5ffad4d80a Release 5.2.0.144Z
Release 5.2.0.144Z

Change-Id: I3f620d95ad779919e44de7174ca946ae9cdf2b46
CRs-Fixed: 774533
2019-08-20 14:38:32 -07:00
Nirav Shah
7f37dbea19 qcacld-3.0: Fix DHCP indication to FW feature in SAP for HL
In case of HL, send tx completion bit in HTT tx descriptor
to receive tx completion from FW and disable DHCP indication
to FW properly.

Change-Id: Iff8e0c1f5d95c4f62af8b498552d92b57006969c
CRS-Fixed: 2506011
2019-08-20 14:38:32 -07:00
nshrivas
86f222418b Release 5.2.0.144Y
Release 5.2.0.144Y

Change-Id: Ica9a04135069bbdc5e1d62e0320c3a1ea1ba4f3a
CRs-Fixed: 774533
2019-08-20 05:19:34 -07:00
Jianmin Zhu
ef22819b7f qcacld-3.0: Refactor lim add bss rsp handler
Replace lim functions parameter struct scheduler_msg
with struct bss_params.
Internal functions don't need param struct scheduler_msg,
wma can call lim API: lim_handle_mlm_add_bss_rsp directly
instead of post msg.

Refactor struct bss_params memory free method.
whether success or fail when handle lim add bss rsp,
struct bss_params memory need free, it is simple and
clear to free only in one place: end of
lim_handle_mlm_add_bss_rsp.

Change-Id: I2d5d647a6949b1e0bdfbbe9a4dfb390a362a75ee
CRs-Fixed: 2508876
2019-08-20 05:19:33 -07:00
Lin Bai
96f6609e86 qcacld-3.0: Rename last_acs_channel_list to last_acs_freq_list
This member renamed by another change recently, and change here
accordingly to avoid compilation issue.

Change-Id: I65903cdb5255deca4b4a83daceec178790e76501
CRs-Fixed: 2505462
2019-08-20 05:19:28 -07:00
Pragaspathi Thilagaraj
1c17ee93f7 qcacld-3.0: Set correct op_flag in sme_set_del_pmkid_cache
Currently the host driver sets PMKSA op_flag for flush and
delete PMKSA entry as in both the cases PMK length is 0.
This is not correct because for delete PMKSA command only
the bssid and SSID will be sent to the firmware.
For the host driver to distinguish between del_pmksa and
flush pmksa, the is_flush_all flag should be used.
is_flush_all: true - Flush pmksa
is_flush_all: false - set/del pmksa based on the action flag.

Change-Id: I7eac65317a9c6904cfd08acce328a65df451269e
CRs-Fixed: 2503372
2019-08-20 05:19:22 -07:00
nshrivas
d384a3f3b8 Release 5.2.0.144X
Release 5.2.0.144X

Change-Id: I6e03041a83005cca927cda1f0e90e04a65365e24
CRs-Fixed: 774533
2019-08-20 03:59:24 -07:00
Rakshith Suresh Patkar
73654d0a34 qcacld-3.0: Cleanup ol_txrx_flush_cache_rx_queue [PEER_ID_PHASE1]
Cleanup ol_txrx_flush_cache_rx_queue to find peer
from peer_list instead of sta_id.

Change-Id: Ia737e732051f3cdad53b1a552eb273b8a05562aa
CRs-Fixed: 2508259
2019-08-20 03:59:24 -07:00
Sourav Mohapatra
efb49da46e qcacld-3.0: Clean up the usage of sta_to_adapter in HDD
The mapping of sta_id to the adapter in hdd context stores the adapter
with respect to the corresponding sta_id. Currently, the mapping is not
used anywhere in the driver even though the adapters are stored in it.

As there is no usage for the mapping, remove it as a part of sta_id
cleanup effort.

Change-Id: I26590a69e61d82f723a83eb3f9f24c42afa6c5a2
CRs-Fixed: 2511767
2019-08-20 03:59:20 -07:00
nshrivas
8f97145518 Release 5.2.0.144W
Release 5.2.0.144W

Change-Id: Idb8f04034b6a443df766f09b7fc139e50dadcb27
CRs-Fixed: 774533
2019-08-20 02:39:26 -07:00
Arun Kumar Khandavalli
e8a01b80db qcacld-3.0: Free the tdls memory in the error conditions
As part of the tdls vdev creation, tdls osif memory is allocated
and not freed in the error condition, which can result in the
memory leak.

Free the tdls osif memory in the error condition

Change-Id: I084b14c4277be3e88142e3eaaabcf3293a15f220
CRs-Fixed: 2507609
2019-08-20 02:39:26 -07:00
Will Huang
c3fb27d117 qcacld-3.0: Make hdd_switch_sap_channel execute once at same time
The sap unsafe channel restart process include two subprocesses: CSA ie
update and channel switch, but CSA ie update request using
mac->sap.SapDfsInfo to save target channel switch parameters, which
would be overwritten by 2nd sap restart at same time. For example:
SAP1 on chan 1 and SAP2 on chan 36, then lte coex mark chan 1 and
chan 36 as unsafe channels, now SAP1 and SAP2 would switch to same
channel, but actually they can be on different channels doing DBS.

To fix it, one option is save the target channel switch parameters to
different session, but looks it may introduce a lot of code change,
because the logic is shared with DFS/concurrency. So the simple option
is making sap unsafe channel restart execute once at same time.

Change-Id: Ieaab3007fb6e79a9741f892e86771d2f52c03e3c
CRs-Fixed: 2504867
2019-08-20 02:39:21 -07:00
Liangwei Dong
2e5f31d731 qcacld-3.0: Do not remove unsafe channel for SAP
If g_sta_sap_scc_on_lte_coex_chan != 0, the SAP and
STA SCC on unsafe channel is allowed.
The change keeps the unsafe channel in SAP channel
list if STA is active on the channel.

Change-Id: I328841df611a000b1c4d4d09618a4035f0b7fba6
CRs-Fixed: 2509730
2019-08-20 02:39:17 -07:00
nshrivas
c2708a8d50 Release 5.2.0.144V
Release 5.2.0.144V

Change-Id: I5042da5df0edf21ebbd8cdef3e946d44192e27e8
CRs-Fixed: 774533
2019-08-19 09:37:14 -07:00
Abhishek Ambure
09905d743a qcacld-3.0: Refactor vdev stop/down code
Refactor vdev stop and down code to target_if common code.
Remove legacy code for vdev stop and down.

Change-Id: I4ab0743d39a3b37816ab9f18e8850cadf1335c15
CRs-Fixed: 2506649
2019-08-19 09:37:13 -07:00
nshrivas
9bb3305a94 Release 5.2.0.144U
Release 5.2.0.144U

Change-Id: I5f8c5ae6771a0da58a9fa5e20ed369acad552482
CRs-Fixed: 774533
2019-08-19 06:19:19 -07:00
Bala Venkatesh
352834005d Revert "qcacmn: Free NDI peers/vdev at time of ndi_delete/driver unload"
This reverts commit I04631ffd611d6ded318ddfb65b2dfeba479c9bdc.
Currently, for all the peers cleanup is done in lim and wma layers
to remove this peers. The original change is deleting the ndi
peer in HDD, and can lead to memory overwrites.
Hence reverting the change.

Change-Id: Id0083c3d1612f0fdccb6fca2c9cc4c03f607a139
CRs-Fixed: 2507142
2019-08-19 06:19:19 -07:00
wadesong
bf39868cae qcacld-3.0: Fix an improper parameter type casting
In function csr_check_concurrent_channel_overlap, local
variable intf_ch is defined as uint16_t, but its pointer
is casted to uint32_t * before invoking
policy_mgr_get_sap_mandatory_channel, which will do
32-bit memory write and causes a stack memory over-
writing.

Call Trace:
  dump_stack+0x46/0x59
  print_address_description+0x66/0x22b
  kasan_report+0x21f/0x245
  policy_mgr_get_sap_mandatory_channel+0x1fd/0x258 [wlan]
  csr_check_concurrent_channel_overlap+0xf84/0x10d2 [wlan]
  sme_check_concurrent_channel_overlap+0xaa/0xf0 [wlan]
  wlansap_check_cc_intf+0x102/0x124 [wlan]
  wlan_hdd_get_channel_for_sap_restart+0x506/0x8f8 [wlan]
  policy_mgr_check_sta_ap_concurrent_ch_intf+0x35e/0x425[wlan]
  process_one_work+0x2cc/0x53b
  worker_thread+0x357/0x490

Change the type of the 2nd parameter to uint16_t within
function policy_mgr_get_sap_mandatory_channel, so only
16-bit memory writing will take place.

Change-Id: If514a394e65d005a1fe025c0e753bf7440dd5dde
CRs-Fixed: 2508798
2019-08-19 06:19:15 -07:00
nshrivas
d0aad46178 Release 5.2.0.144T
Release 5.2.0.144T

Change-Id: I42435cd2333b10fca7d5e69883d4793df6a36386
CRs-Fixed: 774533
2019-08-19 02:10:46 -07:00
Wu Gao
b4944be672 qcacld-3.0: Call target_if_init after dispatcher_init
Direct buffer tx component initializes in target_if_init, which cause
platform assert since g_umac_glb_obj is NULL. So change the order to
avoid NULL pointer access.

Change-Id: I348775d08ccc478caef605c2ae8d1b6d65d77eb2
CRs-Fixed: 2497809
2019-08-19 02:10:46 -07:00
Nirav Shah
5db193fced qcacld-3.0: Featurize partial reorder properly
Avoid compiling ol_rx_reorder.c and ol_rx_reorder_timeout.c
for low latency and only compile for high latency
data path.

Change-Id: I1f3819fa093766abba87e5dc6dc44e6d2188740b
CRs-Fixed: 2506005
2019-08-19 02:10:41 -07:00
nshrivas
f0ff8b3c90 Release 5.2.0.144S
Release 5.2.0.144S

Change-Id: I0d0c4afe147756faf8b855aa72252f93776178fb
CRs-Fixed: 774533
2019-08-19 01:02:25 -07:00
Wu Gao
6c5a45bcc5 qcacld-3.0: Fix compilation issue about wma_init_dbr_params
In "Change-Id: I2896f7704ffb809214c5b08756c4b8673307fd9e", parameter
type of hif_get_hal_handle changed from void to hif_opaque_softc,
which cause compilation failure in wma_init_dbr_params.

Change-Id: Idbb591bb1ea1507661882fe48b18eaaffcac164d
CRs-Fixed: 2504894
2019-08-19 01:02:25 -07:00
nshrivas
ee31b3807a Release 5.2.0.144R
Release 5.2.0.144R

Change-Id: I49b401e224c10a4edd0f09199aa5d495890f0d12
CRs-Fixed: 774533
2019-08-18 23:44:57 -07:00
Jinwei Chen
c460236962 qcacld-3.0: support monitor mode enablement by changing driver mode
Support monitor mode enablement by changing driver mode, and also
remove the support that enable monitor mode with insmod parameter
"con_mode_monitor = 4", use "con_mode = 4" instead.

enable monitor mode steps for reference:
(1) change driver mode
   a. svc wifi disable
   b. echo 4 > /sys/module/wlan/parameters/con_mode
   c. ifconfig wlan0 up
   d. iwpriv wlan0 setMonChan 11 0

(2) insmod with kernal parameter way
   a. insmod /vendor/lib/modules/qca_cld3_wlan.ko con_mode=4
   b. ifconfig wlan0 up
   c. iwpriv wlan0 setMonChan 11 0

Change-Id: Ie615533d060261d545b3b92bea9916099ccccadd
CRs-Fixed: 2494158
2019-08-18 23:44:56 -07:00
nshrivas
7a4e739332 Release 5.2.0.144Q
Release 5.2.0.144Q

Change-Id: I1d08da1e1f4ec4ef19517034b44c4568498f5304
CRs-Fixed: 774533
2019-08-18 10:10:26 -07:00
Sourav Mohapatra
5ab5180d9e qcacld-3.0: Rectify possible scenario of double free
Presently in the driver, in function hdd_objmgr_create_and_store_vdev
the vdev object is created and stored. In case the creation of the vdev
fails due to some reason, the corresponding error condition tries to
free the osif_priv pointer. This osif_free pointer is actually already
freed as a part of vdev_obj_delete -> vdev_release_ref -> vdev_obj_free.
As this is already freed, a possible double free scenario can occur in
the original error handling scenario.

To avoid this scenario, do not free the osif_priv pointer in the error
handling as it is already taken care in the caller.

Change-Id: I7fc7be187ce1e303c81da885a75c600a7b6c4b3e
CRs-Fixed: 2507432
2019-08-18 10:10:25 -07:00
nshrivas
fb1f91d2f9 Release 5.2.0.144P
Release 5.2.0.144P

Change-Id: I6a732c294e84d0332b046d1ea07d8891d8b44c6c
CRs-Fixed: 774533
2019-08-18 08:20:30 -07:00
Srinivas Dasari
225abbf3d6 qcacld-3.0: Introduce ini param for full roam scan period
Full roam scan period is the minimum idle period in seconds between
two successive full channel roam scans. Firmware expects this param
as part of roam scan offload request. Add an ini param to set
it to a default value and use it while sending roam scan offload
request.

Change-Id: Id66b583b2c487f06e62298641dc28853af3ab11c
CRs-Fixed: 2507448
2019-08-18 08:20:29 -07:00
nshrivas
2ee792e7fa Release 5.2.0.144O
Release 5.2.0.144O

Change-Id: Iac2ad41535316152e4d022f6c378d099aaa2fad7
CRs-Fixed: 774533
2019-08-18 06:21:33 -07:00
Srinivas Dasari
0cc6437fa1 qcacld-3.0: Rename the values of qca_wlan_vendor_roaming_subcmd
enum qca_wlan_vendor_roaming_subcmd contains different values of
subcmds to be used with QCA_WLAN_VENDOR_ATTR_ROAMING_SUBCMD and
these are not attributes.
Values of the enum qca_wlan_vendor_roaming_subcmd have been
renamed according to usage and relevant documentation is added
in qca-vendor.h. Make corresponding changes in usage to avoid
compilation errors.
Use right max index(QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_MAX) while
parsing for PARAM_LIST_SSID. This caused compilation error as the
inappropriate max index(QCA_WLAN_VENDOR_ATTR_ROAM_SUBCMD_MAX)
is used for parsing which has been deleted now.

Change-Id: Ifc063b801ba2729e8cff1581ef63e78e1d36a32d
CRs-Fixed: 2508196
2019-08-18 06:21:32 -07:00
nshrivas
4413e54112 Release 5.2.0.144N
Release 5.2.0.144N

Change-Id: I60df6816eec79fbc4e96439d29469ab4094e8237
CRs-Fixed: 774533
2019-08-17 10:53:43 -07:00
Sourav Mohapatra
5d22fbd743 qcacld-3.0: Refactor HDD for changes in cdp_fc_get_tx_resource
Currently, the API cdp_fc_get_tx_resource  takes as input the sta_id. As a
part of cleaning up the usage of sta_id, replace it by peer mac address.

Change-Id: I7b81a05d312da84aa16c82f0f6152710daf986c5
CRs-Fixed: 2507274
2019-08-17 10:53:42 -07:00
Rakshith Suresh Patkar
6ff56da568 qcacld-3.0: Cleanup ol_txrx_get_tx_resource[PEER_ID_PHASE1]
Cleanup ol_txrx_get_tx_resource to be peer mac address based
from local peer id based.

Change-Id: Id7ac4b5152c782d3475d9fad59f8f835102483cc
CRs-Fixed: 2508132
2019-08-17 10:53:38 -07:00
nshrivas
f018ae60d7 Release 5.2.0.144M
Release 5.2.0.144M

Change-Id: I41d2dc55dffe91211d058bde7709213b8a9031db
CRs-Fixed: 774533
2019-08-16 22:21:36 -07:00
Alan Chen
6ccc4fa788 qcacld-3.0: Sync runtime pm resume when system suspend occurs
Some system suspend commands are getting sent to firmware while
runtime resume is in progress. Sync runtime pm resume when system
suspend occurs to avoid this.

Change-Id: I6e652104e984b81e29a5f328fcf3937502a8f47f
CRs-Fixed: 2509910
2019-08-16 22:21:36 -07:00
nshrivas
8fd84758e7 Release 5.2.0.144L
Release 5.2.0.144L

Change-Id: I1799cbf900b786153e151e0b1f471375fd32b65e
CRs-Fixed: 774533
2019-08-16 18:32:45 -07:00
Rakesh Pillai
79afaed56e qcacld-3.0: Destroy NUD tracking work only for STA mode
Currently the NUD tracking is done only for STA mode.
For all the adapters the NUD tracking work is not
created and hence should not be destroyed when the
adapter is cleaned up.

Destroy the NUD tracking work only for the STA adapter.

CRs-Fixed: 2505365
Change-Id: I677a07cb37e2d547e62b7ffebf6d014255a9d237
2019-08-16 18:32:44 -07:00
nshrivas
076a3031f9 Release 5.2.0.144K
Release 5.2.0.144K

Change-Id: I0ba188ac6f90cc4e8ff0bf9955efd491927e193d
CRs-Fixed: 774533
2019-08-16 10:48:32 -07:00
Yeshwanth Sriram Guntuka
f33e2fe57c qcacld-3.0: Add debug print for beacon report meas mode
Add debug print to indicate the measurement mode for
beacon report request.

Change-Id: I7f61cd7f058ef0dcc4db425e685974cc3f53415a
CRs-Fixed: 2507593
2019-08-16 10:48:31 -07:00
nshrivas
037d8093e7 Release 5.2.0.144J
Release 5.2.0.144J

Change-Id: I72208d5efcf08964b44864274b33777f7c61024a
CRs-Fixed: 774533
2019-08-16 08:22:42 -07:00
Chaoli Zhou
74af4177a8 qcacld-3.0: Add packet drop status
In the current wlanhost driver dump status, it doesn't
support to count the dropped packets seperately that
due to firmware don't have enough tx descriptors, so
add such function which can benefit KPI tune.

Change-Id: I1a72acbc4f1f861c2013a1ef1a95b73acccd6b53
CRs-Fixed: 2507410
2019-08-16 08:22:41 -07:00
gaurank kathpalia
69f052b95b qcacld-3.0: Avoid channel 12, 13 for SAP operation
Currently the driver selects channel 12, 13 as they are
free from BSS as their weights are minimum, which results
into IOT issues as legacy STAs do not support the same.

Fix is to avoid channel 12, 13 in SAP ACS process, and try
to start the SAP on channels from 1 - 11.

Change-Id: If735fade7d7b489b45a20f74c04bab5582343f79
CRs-Fixed: 2509791
2019-08-16 08:22:37 -07:00