Commit Graph

871 Commits

Author SHA1 Message Date
Jia Ding
db2e940123 qcacld-3.0: Initialize IPA metering feature and perf level
In IPA uC ready handler, metering feature and perf level are not
initialized. Therefore properly initialize them after IPA pipes
are connected.

Change-Id: I99621bb2c2831d66e11b0ca903ecb324ef898836
CRs-Fixed: 2582409
2019-12-11 05:01:34 -08:00
gaurank kathpalia
0cecbd4d4e qcacld-3.0: Change the default value of normalize acs ini weight
Change the default value of normalize weight ini to
disable all non-PSC 6ghz channels for the SAP ACS
operation, and give weightage only to the PSC
frequencies.

Change-Id: I4c8f349a396ffe4a2f378a59f5a67036b9d573eb
CRs-Fixed: 2578824
2019-12-09 18:56:58 -08:00
Manikandan Mohan
a8a0a0d00e qcacld-3.0: Decouple NDI policy mgr update from active peer count
In multiple NDP peer case NDP indication might come for these
peers before first NDI confirm is sent for first peer. This
results in not updating policy manager session for NDI and
not creating datapath TX pool. Fix this issue by using one
time init flag for NDI instead of relying on peer count.

Change-Id: I812ff9be46580f3fb2da03ae7e1c1a36d205c38f
CRs-fixed: 2573935
2019-12-09 13:55:55 -08:00
Jianmin Zhu
327317eea2 qcacld-3.0: Allow STA+SAP SCC on LTE-coex channel
If STA is on LTE-coex channel,  start SAP on same band, to force
scc, it need select the LTE-coex channel too, or SAP failed to
start.

CRs-Fixed: 2580240
Change-Id: Ib05524711cb2475c3ca5ec7cf61a2b29c05658b6
2019-12-09 13:55:41 -08:00
Jianmin Zhu
61d502d966 qcacld-3.0: SAP CSA from 5G to 2G for modem N79
For SAP/P2P GO on 5G, when receive cmd to disable 5G band when
modem n79 band used, will move to 2G band via CSA.
1. If no active connection on 2G, select ch by safe list, or
channel 6.
2. If there is STA on 2G, force scc with it.
3. If there is SAP/GO on 2G, force scc with it.
4. Handle one race condition that if candidate is already
selected & FW has gone ahead with roaming or about to go ahead
when set_band comes, it will be complicated for FW to stop the
current roaming. Instead, host will check roam sync to make sure
the new AP is on 2G, or disconnect the AP.
5. If 2 SAP on 5G, move both to 2G and keep scc.

When Set band to enable 5G band again, restored all 5G SAP/Go..

Change-Id: I9b2b1ead3b4502022aeefc08359037457bb051f9
CRs-Fixed: 2580204
2019-12-09 13:54:16 -08:00
Arun Kumar Khandavalli
efe77ff948 qcacld-3.0: Don't use vdev_mlme object in the vdev delete response
As part of the new changes, vdev mlme object will be freed before
the vdev delete response is received from the firmware. Hence do
not use the vdev_mlme object in the vdev delete response handler.

Change-Id: Idec5775f6c7ac767baedd173a7bde0d3a358d0fe
CRs-Fixed: 2563381
2019-12-05 23:53:40 -08:00
Abhishek Singh
fe26a582f9 qcacld-3.0: Handle the error action frames in mgmt tx
For Action frame which are not handled, the resp is sent back to the
source without change, except that MSB of the Category set to 1.
so driver may get action frame with WEP BIT set and category with
MSB set.

Due to the error category, driver is not able to determine if its
a RMF frame and thus doesn't add the MIC header and data length to
the frame.

Now with WEP bit set and MIC header and MIC data length not
added to the frame, the firmware assert due to invalid frame length.

Thus reset the WEP bit in the frames sent by mgmt tx path and add
WEP only if keys are set and frame is RMF. Also ignore MSB to get
the actual action category of the action frame.

Change-Id: I2a2918dbb15979e4184dbf8489e5c3ade15d0e6f
CRs-Fixed: 2580233
2019-12-05 16:39:36 -08:00
Bala Venkatesh
81281077ab qcacld-3.0: Remove the INI force_rsne_override
Currently, RSNE if given from userspace is overrided if the Ini
force_rsne_override is disabled as a security. But there
are sufficient checks already in kernel to validatethe RSNE
given by userspace. Hence this INI is no longer required.

Change-Id: Ifcc9298dcfa035d05e9ee4fb78a4fa2c9f249461
CRs-Fixed: 2573540
2019-12-05 16:38:44 -08:00
Kiran Kumar Lokere
571f0d3e65 qcacld-3.0: Add 80+80 restricted BW support
Add support for restricted 80+80 bandwidth in STA and SAP modes.

Change-Id: Id1a61b853584fa84db3bb8f0f2aaf68eecabeaac
CRs-Fixed: 2570023
2019-12-04 14:40:31 -08:00
Amruta Kulkarni
59f6350e8b qcacld-3.0: Enhance logic for dwell time 2g
With this change,in concurrent mode
(SAP on 5g and peer connected + STA Scan ongoing),
active dwell time 2g is not reset to 0.

Change-Id: I20ace5561137a0dd8def497e3bbbbcbeede80ea5
CRs-Fixed: 2572918
2019-12-04 00:09:47 -08:00
Vevek Venkatesan
959ac03d07 qcacld-3.0: setup IPA sys pipes if wlan_ipa_wdi_init succeeds
At present, IPA sys pipes setup done before wlan_ipa_wdi_init,
so chances for IPA uC is not yet up and running. As wdi init
succeeds only if uC is up and running, setting up IPA sys pipes
after wlan_ipa_wdi_init succeeds.

Change-Id: I7dcae49db0b0a2114908284379096f39e6f16a50
CRs-Fixed: 2573929
2019-12-03 20:56:15 -08:00
Sourav Mohapatra
fab026a99a qcacld-3.0: Send RTT capability for STA mode
Based on the ini gfine_time_meas_cap, send enable/disable value to the
firmware for STA INITIATOR/RESPONDER mode using VDEV set param.

Change-Id: Idd4142e13061cd1af992bda88d0a0b81edc42fef
CRs-Fixed: 2574050
2019-12-03 13:10:29 -08:00
Jia Ding
8d4db30812 qcacld-3.0: Add dual STA support in WLAN IPA component
Currently dual STA is not supported in WLAN IPA component,
where first STA interface info will be overridden by second
STA including iface_ctx and interface registration to IPA
driver.

When second STA is switched to SAP and a ref-client is
connected to SAP, IPA datapath will be enabled for Wifi
sharing feature. But wlan0 interface is not registered
to IPA driver and this will lead to packet drops for
STA on the RX IPA exception path. IPA driver relies
on information such as vdev_id wlan driver registered
to correctly set skb->cb[0] and wlan driver uses
skb->cb[0] to find the correct vdev to pass packets up
to stack. Since STA interface info is not in IPA,
vdev_id for RX exception packets are thus wrong.

Fix is to store multiple STA interfaces in iface_ctx
and all of them are registered to IPA driver.

Change-Id: I745618c22e24b6c56719f8ae5faf653f55b99bca
CRs-Fixed: 2573567
2019-12-02 02:08:35 -08:00
Srinivas Dasari
b24bdd3f73 qcacld-3.0: Consider NAN enabling also as connection in progress
There is a race condition while handling the below scenario,
1. NAN enable request is received from framework.
2. Policy mgr opportunistic timer expired and set hw mode
   initiated to Single MAC mode in scheduler thread at
   the same time

As the opportunistic timer handler doesn't have any info if
NAN enable initiated in DBS mode, it's configuring the hw
mode to Single Mac Mode just before NAN enable request is sent
to firmware. So the NAN enable request is sent to firmware in
Single Mac Mode which is not allowed by firmware.

NAN enable/disable is also similar to connection in progress
status in case of STA. So provide NAN enable/disable status
through hdd_is_connection_in_progress() to the opportunistic
timer handler. Opportunistic timer handler restarts the timer as
connection(NAN enable/disable) is in progress.

Also set hw_mode_change_in_progress before checking the
connection progress status. This is to avoid a possible race in
the below scenario,
1. NAN-enable sets the state but scheduler thread had read the
   state just before that
2. NAN-enable read the hw_mode_change_in_progress just
   before it gets set by scheduler thread.

Change-Id: I1a184c84520deb3f6ad1ec010a0fdefda96a5364
CRs-Fixed: 2566841
2019-12-01 17:39:45 -08:00
Liangwei Dong
b5e89852ab qcacld-3.0: Fix Memory leak sta_ap_intf_check_work_info
At present policy_mgr_check_concurrent_intf_and_restart_sap
will allocate memory for sta_ap_intf_check_work_info for each
work scheduling of sta_ap_intf_check_work. Potential race condition
would be the pm_ctx->sta_ap_intf_check_work_info is overwritten
in other thread context which is calling same function.
It is not necessary to maintain the memory
sta_ap_intf_check_work_info dynamically since only one work
sta_ap_intf_check_work is expected to run at same time.

Move the sta_ap_intf_check_work_info memory allocation to
psoc open handler and free it when psoc close.

Change-Id: I29b2f2528a6d537cb853968153340a75fd5fe88b
CRs-Fixed: 2571624
2019-11-27 04:16:41 -08:00
Liangwei Dong
d4a91a6f12 qcacld-3.0: Refine wma_get_caps_for_phyidx_hwmode
The current function doesn't handle "hw_mode" parameter.
And if band is specified the function needs to find the
correct "phy cap" in mac_phy_cap list.
The "supported_bands" can be a bit mask of
(WLAN_2G_CAPABILITY | WLAN_5G_CAPABILITY), use "&" to find
the phy cap of requested band.
Remove unused API wma_get_phyid_for_given_band.

Change-Id: I4b120d681b820e2a6e2b82f33d67fbcf6136af09
CRs-Fixed: 2571400
2019-11-26 22:00:17 -08:00
gaurank kathpalia
44f1abad87 qcacld-3.0: Block 3 port concurrency for MCC
Currently the 3 port concurrency combinations
which are not PORed should not be allowed to
connect or beacon as it could lead to functional
issues.

Fix is to bloack the 3 port concurrency which are
not PORed.

Change-Id: I792d0484da96fc0ae994fafa2c6b3ac787016815
CRs-Fixed: 2567322
2019-11-22 08:32:25 -08:00
Abhishek Singh
345be418c9 qcacld-3.0: Replace sme_session_id with vdev_id
Replace sme_session_id with vdev_id in SME and LIM.

Change-Id: I7a4a85c440d8d7d7a2a4163bc71776e288da0222
CRs-Fixed: 2569190
2019-11-22 07:12:45 -08:00
Sourav Mohapatra
60c3b2b014 qcacld-3.0: Add checks to NS and ARP offload requests
Currently the offloading of the NS and ARP to firmware is inefficient;
redundant caching is performed even if offload is not sent. This causes
wastage of resources and increases code complexity.

Introduce checks before caching and offload to ensure that the mentioned
inefficiencies are taken care of.

Change-Id: I6013810e1e08adb15c801f4fc21e1b50371bacda
CRs-Fixed: 2569763
2019-11-22 05:35:35 -08:00
Abhinav Kumar
13ebd82e91 qcacld-3.0: Make Stick time value to zero by default
Roaming to new AP is depends on the periodic scan which occurs every
10sec in fw. Due to the default value of sticky time (btm_sticky_time)
to BTM AP is 5 min, periodic roaming scan gets disabled in fw till
sticky timer expiry. So FW won’t trigger a periodic scan for 5 min,
in case of roaming to new AP by BTM.

In case if STA roams to new AP by BTM and Disassociation Timer
expires before Stick time, DUT is not able to roam to a candidate
AP till Stick time expiry.

In order to allow roaming just after disassociation timer expiry,
Make Stick time value to zero by default.

Change-Id: I0de09ec7134d543a9c934a03941bcdb57b983dc9
CRs-Fixed: 2566842
2019-11-22 02:22:31 -08:00
Pragaspathi Thilagaraj
c7229ac591 qcacld-3.0: Fix length of EDCA config strings
Currently the driver uses STR_EDCA_ANI_ACBK_LOCAL as the length
for all the EDCA_LOCAL string cfg items.

Use the corresponding string length for EDCA_LOCAL string.

Change-Id: Ia6fd19b90c3d6c2c6e7a12e9f44389db2bf160f8
CRs-Fixed: 2569514
2019-11-22 02:22:17 -08:00
Sourav Mohapatra
2a03074fae qcacld-3.0: Rectify max values for TSF pin inis
The max values of the ini's CFG_SET_TSF_GPIO_PIN and
CFG_SET_TSF_IRQ_HOST_GPIO_PIN are set wrong. The default value for those
is higher than the max value.

Increase the max value to accommodate the correct range.

Change-Id: I7d5528801c3b0fc2480e00b28ab4eb8f0385930a
CRs-Fixed: 2570044
2019-11-22 02:22:03 -08:00
Arun Kumar Khandavalli
4f6a5bd519 qcacld-3.0: Send vdev create to fw from object create notification
Send vdev create to firmware when the mlme vdev create handler
is invoked as part of the vdev object create.

Change-Id: Ibba02f6b5885d7b3a62529ef51768f520395513e
CRs-Fixed: 2555943
2019-11-21 09:13:20 -08:00
Vevek Venkatesan
29076ec1d8 qcacld-3.0: cdp: Converge cdp_ipa_ops
Currently cdp ops are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.

- ipa_get_resource
- ipa_set_doorbell_paddr
- ipa_set_active
- ipa_register_op_cb
- ipa_get_stat
- ipa_tx_data_frame
- ipa_uc_get_share_stats
- ipa_uc_set_quota
- ipa_enable_autonomy
- ipa_disable_autonomy
- ipa_setup
- ipa_enable_pipes
- ipa_disable_pipes
- ipa_rx_intrabss_fwd

Change-Id: I678d7a7de7132417ff6051b0fd6da5d14426d21e
CRs-Fixed: 2540861
2019-11-21 06:12:04 -08:00
Rakesh Pillai
6a36b0a26a qcacld-3.0: cdp: Convergence of cdp misc ops
Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles if
it has been deleted.

Converged misc_ops
- tx_non_std
- get_opmode
- get_tx_ack_stats
- set_ibss_vdev_heart_beat_timer
- hl_tdls_flag_reset
- set_wisa_mode
- txrx_post_data_stall_event
- update_mac_id
- pkt_log_init
- pkt_log_con_service
- get_num_rx_contexts
- set_wmm_param
- flush_rx_frames
- bad_peer_txctl_set_setting
- bad_peer_txctl_update_threshold
- txrx_data_stall_cb_register
- txrx_data_stall_cb_deregister
- vdev_set_driver_del_ack_enable
- get_intra_bss_fwd_pkts_count
- mark_first_wakeup_packet
- register_pktdump_cb
- unregister_pktdump_cb
- pdev_reset_driver_del_ack
- runtime_suspend
- runtime_resume

CRs-Fixed: 2539735
Change-Id: I2baad09fde29d439ae2099e01e4e68ed6b94196d
2019-11-21 06:11:43 -08:00
Liangwei Dong
897b439b3c qcacld-3.0: Add policy_mgr_is_hw_dbs_required_for_band API
policy_mgr_is_hw_dbs_required_for_band is for any HW where
PHYA/MAC0 doesn't support the given band. We need to switch
to DBS mode to support the band. So far we have
overloaded policy_mgr_is_hw_dbs_2x2_capable to achieve above.
Need a cleaner API to work in a generic way
(for 2x2, 1x1 or any chain mask configuration).

Change-Id: I1cb28bece1242fc749a0a6a56fadca0502850c43
CRs-Fixed: 2565939
2019-11-21 00:44:19 -08:00
Wu Gao
480a304199 qcacld-3.0: Cleanup tx context if cancel mgmt tx
It doesn't cleanup tx context immediately, which cause mgmt will be
tx again unexpectly. Then P2P state mismached and form connection
failed.

Change-Id: I9eba9df057221e5dabf5ff42fe0d2fd695aea9df
CRs-Fixed: 2564622
2019-11-19 01:45:36 -08:00
Tiger Yu
564aa84417 qcacld-3.0: Update the IPA interface context if device_mode is different
For wlan_ipa_setup_iface, if found the net_dev is already there,  but the
device_mode is different, will remove this obsolete record and update it
with new interface context for current IPA WLAN event.

Change-Id: Ib9ecd7f7b3b9603c37dc1d69cd0f3a2868c978ec
CRs-Fixed: 2567222
2019-11-18 04:04:56 -08:00
Abhishek Ambure
ee81f8b2eb qcacld-3.0: Set 5G band capability bit in gActionOUIConnect1x1 ini
gActionOUIConnect1x1 is used to specify action OUIs for 1x1
connection.

Some Access Points are unable to handle SMPS and OMN frames and shows
abnormal behaviour when STA is switching between 2x2 to 1x1 and
vice-versa. To avoid this, restrict connection in 1x1 mode with such APs.

Here the scenario is DUT STA1 connects in 2x2 mode to AP1 in 5G mode then
later on DUT another STA2 iface connects to AP2 in 2G mode. DUT sends OMN
frame to AP1 to inform that it is going to switch to 1x1 mode. AP1 ack
this frame but doesn't change its Tx rates and continues to use 2x2 rates
which DUT cannot ACK. This causes low throughput issue where AP1 Tx rate
falls to 6Mbps due to missing acks.

Hence, 5G band capability bit in "gActionOUIConnect1x1" is set to make
connections in 1x1 with such AP.

Presently, 5G band capability bit is not checked if 2G band capability bit
is not set or 2G band is not enabled. Hence, Vendor AP capability check for
2G and 5G Band is refactored.

Change-Id: Ic6b682451405a2373000e4c64656f50c2fab0ee6
CRs-Fixed: 2558293
2019-11-18 02:29:15 -08:00
Wu Gao
6b778803fc qcacld-3.0: PCL update for case about SAP and NAN
Updated PCL table to support 3-port concurrency AP+NAN_DISC+NDI/NDP
and 4-port concurrency scenarios AP+AP+NAN_DISC+NDI/NDP.

Change-Id: Ic8ba4d12651d42b6c07cf86125a17071a57683d2
CRs-Fixed: 2508242
2019-11-15 16:01:07 -08:00
Kiran Kumar Lokere
5414066815 qcacld-3.0: Policy manager support in 160MHz mode
Add policy manager support for 160MHz mode connection.

Change-Id: I697dabbd752e768c128f8663674c91adccd72424
CRs-Fixed: 2558047
2019-11-15 05:43:43 -08:00
gaurank kathpalia
34fe0b641b qcacld-3.0: Enable the DBS ini if DBS is mandatory
The driver does not check the device DBS capability
and the DBS ini compatibility( ch select policy)
If the DBS ini channel_select_logic_conc is disabled
and HW mandates DBS capability then overide the ini
to always keep it enable.

Change-Id: I629fd8661f70b64808a55c4c9bdafa9608787b09
CRs-Fixed: 2551648
2019-11-15 03:57:32 -08:00
gaurank kathpalia
e314029ccf qcacld-3.0: Enable the DBS ini if DBS is mandatory
The driver does not check the device DBS capability
and the DBS ini compatibility.
If the DBS ini gDualMacFeatureDisable is disabled
and HW mandates DBS capability then overide the ini
to always keep it enable.

Change-Id: I2b31453f9c8a04cef7f943b30d3c28f844c276b5
CRs-Fixed: 2551644
2019-11-15 03:57:22 -08:00
Rachit Kankane
8bb26e3ea5 qcacld-3.0: Increase max limit -gEnableDynamicDTIM
Increase max limit to value 10 for INI gEnableDynamicDTIM.

Change-Id: I91cbe24bd37818a65c9678c89c482a059ff1e37e
CRs-Fixed: 2536749
2019-11-13 06:53:05 -08:00
Tushnim Bhattacharyya
76a8e2ae63 qcacld-3.0: Set default value of 2 for g_sta_sap_scc_on_dfs_chan
The value 2 is to enable STA+SAP force SCC on DFS channel if STA
is already on DFS channel & also to allow SAP to come up on DFS
channel stand alone & perform CAC (DFS master mode). Set default
value of 2 for g_sta_sap_scc_on_dfs_chan.

Change-Id: Ic1873e1a5b79086aa3e41d3eecea2049b7fc3adf
CRs-Fixed: 2560614
2019-11-12 02:35:21 -08:00
Rakesh Pillai
f94b162ed0 qcacld-3.0: cdp: Convergence of cdp_l_flowctl_ops
Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles if
it has been deleted.

Converged l_flowctl_ops
- register_tx_flow_control
- set_vdev_tx_desc_limit
- set_vdev_os_queue_status
- deregister_tx_flow_control_cb
- flow_control_cb
- get_tx_resource
- ll_set_tx_pause_q_depth
- vdev_flush
- vdev_pause
- vdev_unpause

CRs-Fixed: 2539748
Change-Id: I8ad4a20914c654b8e8aaf629dda7f673fdb110e4
2019-11-11 23:08:02 -08:00
Rakesh Pillai
84714471df qcacld-3.0: cdp: Convergence of cdp_ocb_ops
Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles if
it has been deleted.

Converged ocb_ops
- set_ocb_chan_info
- get_ocb_chan_info

CRs-Fixed: 2539745
Change-Id: I7de53c48ec6b7f0c09be7c9cf642d8cf4f8eae78
2019-11-11 23:07:52 -08:00
Rakesh Pillai
a889ffa967 qcacld-3.0: cdp: Convergence of cdp_flowctl_ops
Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles if
it has been deleted.

Converged flowctl_ops
- flow_pool_map_handler
- flow_pool_unmap_handler
- dump_flow_pool_info
- tx_desc_thresh_reached

CRs-Fixed: 2539738
Change-Id: I9b11e66d8c2644f16e0f2464c323798a4cba007a
2019-11-11 23:07:35 -08:00
Bala Venkatesh
ff86f89448 qcacld-3.0: Add the ini gTDLSDiscoveryWakeTimeout
Add the support for the ini gTDLSDiscoveryWakeTimeout.
with this ini gTDLSDiscoveryWakeTimeout, FW will be awake
for configured value after sending the discovery request.

Change-Id: I194e5c99972968bbaa46ffb6b8e83604bff15a0a
CRs-Fixed: 2546515
2019-11-11 02:05:27 -08:00
Mohit Khanna
5b42d1b969 qcacld-3.0: Wait for IPA TX Completions on IPA disablement
In DBS scenario(SAP + STA) when all SPA clients disconnect, while STA is
still connected, IPA pipes are disabled on the lithium target. At this
time, its possible that some packets TX from IPA over WLAN are still
pending. If these completions come after IPA pipes are disabled, it can
lead to a NOC error, since the GSI doorbell register for WBM2SW2 ring
may be clock gated (after IPA pipes are disabled).

To avoid this situation, wait for some time before disabling IPA pipes.
IPA pipes are disabled after a timeout, when system suspend call tries
to suspend the bus. A driver unload or a softap tear-down will also
disable the pipes.

Change-Id: I542049fa19d0dcf5c31d9b8a2d836388847dd6c1
CRs-Fixed: 2553670
2019-11-08 15:54:58 -08:00
Arun Kumar Khandavalli
27f443e880 qcacld-3.0: Drive the self peer creation from the sme layer
Presently as part of the vdev creation the self peer for the vdev
is created in the object manager and in the firmware. The self
peer creation in the object manager needs the vdev to be in the
created state. As part of new changes to send the vdev create to
firmware as part of the vdev creation notification there will be
failure in creating in the self peer.

Hence, drive the self peer creation from the SME layer which will
create the vdev.

Change-Id: I0875f4ec5bd96438c0f21056e1d6920d3be2a177
CRs-Fixed: 2555868
2019-11-08 06:54:39 -08:00
Alan Chen
d77099006c qcacld-3.0: Remove arp_ac_category INI item
The mechanism of overriding ARP frames with AC will not work since
firmware always defaults to BE. Since this overriding is not going to
be supported, remove the arp_ac_category INI and all areas that use it.

Change-Id: I8bff251ded5842f3d0c95bb916eb98a051696ae0
CRs-Fixed: 2555459
2019-11-07 09:20:25 -08:00
nakul kachhwaha
e3e92ae6db qcacld-3.0: Fix data stall during TDLS Offchan Operation
In non concurrency scenario with TDLS Offchan link, FW is sending
two pauses namely PAUSE_TYPE_CHOP and PAUSE_TYPE_CHOP_TDLS_OFFCHAN
back to back when DUT dwells between TDLS Off channel and AP channel
respectively. HOST handles these events as vdev based event instead
of peer based event and remove all the tx queues from scheduler for
all the peer irrespective of the pause type. This will lead to data
stall in TDLS offchan scenarios, as at any point of time, host will
be receiving one of the two pauses and keep its peer queues out of
scheduler.

Changes are done to decouple the handling of pause/unpause events
for TDLS peers with Offchan enabled from vdev based pause/unpause.
TDLS peers will be paused/unpaused based on PAUSE_TYPE_CHOP_TDLS_OFFCHAN
pause type. Other pause/unpause events will be handled as usual.

Change-Id: Iccb46fd6d121d5df6d53633c9978ddc8e02f588f
CRs-Fixed: 2558612
2019-11-06 23:50:23 -08:00
bings
a4e27271d9 qcacld-3.0: Disable dfs phyerr offload when no sap/go in DFS channel
As FW required, send WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID when there
is no beaconing session in DFS channel for FW which supports dfs offload.

Change-Id: Ib3c24758b81d6218d2504729d44cdbfb122933ee
CRs-Fixed: 2544846
2019-11-06 14:05:48 -08:00
Bala Venkatesh
7ce8fb0556 qcacld-3.0: Do not reset the tdls link status to tearing
If the force peer is removed from wpa_cli, then without
checking the current link status link status is set to tearing.
Then if the same peer is again marked as forced then that peer
status is not reset to idle and that can lead to tdls connection
denial of that peer.

Reset the tdls link status to tearing only in connected state.

Change-Id: Idd4128b4599fc2dfbb768984f8f9390fc14ab5f6
CRs-Fixed: 2551180
2019-11-06 14:05:41 -08:00
Jianmin Zhu
67c56bfdbf qcacld-3.0: Enable STA+STA MCC
For helium/Hastings, two port STA+STA MCC is PORed
anyway, DBS is preferred for latency usecases.

Change-Id: I71b52974470a562372b5b1981fec1cde1ebdfcf8
CRs-Fixed: 2557583
2019-11-06 06:30:53 -08:00
Jayachandran Sreekumaran
952d6a2072 qcacld-3.0: Provide same vdev id for nss and hw mode update
While operating in SCC mode for AP+STA, STA receives CSA
and switches to a channel in the other band.
After channel switch trigger the NSS update for AP mode.
HW mode switch to DBS1/DBS2 gets triggered after nss update
completion.

POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH is set as the
reason for hw mode update. For NSS update AP vdev id
is used but for HW mode switch STA vdev id is getting used.

This leads to assert in vdev SM while handling the event
WLAN_VDEV_SM_EV_CSA_RESTART in vdev up state.

For NSS mode update followed by HW mode switch cases,
Policy manager need to use the same vdev id for both operations.

Change-Id: I986fa971c0c525ecada4805c70dd629ef8a1cac7
CRs-fixed: 2547119
2019-11-06 03:33:11 -08:00
Sourav Mohapatra
ffcaf378c7 qcacld-3.0: Avoid deadlock during suspend and resume
Presently in the driver, we get the MSI interrupt to wake up from
suspend which directs the call to the both kernel and driver. In the
driver, the HIF callback target_initial_wakeup_cb registered, gets
called in interrupt context while that through the kernel get scheduled
in thread context. These two call can potentially get into a deadlock.

The scenario can be described as:
	- MSI interrupt raised
	- callback invoked from kernel -> takes spinlock on psoc->lock
	- hif callback in interrupt context -> spins on the same psoc->lock
	- deadlock

The problem arises due to the fact that both the kernel thread and the
interrupt handler are executing on the same CPU. This causes the
spinlock in the interrupt context to spin forever.

The solution to mitigate this scenario is to not take the reference
inside the hif callback pmo_core_psoc_handle_initial_wake_up. This
reference was put in place to prevent the wake up callback from getting
affected by psoc creation and deletion. But there seems no need for this
as creation and deletion of psoc happens outside the time-scope of the
wake up callback.

Change-Id: I566ab08802ba3f38e154d26599c73d718ec74bfb
CRs-Fixed: 2556497
2019-11-05 09:27:06 -08:00
Abhishek Singh
9fee518fe3 qcacld-3.0: Avoid calling wlan_hdd_set_mon_chan for STA mode
As part of Ie9ffc701d93ed1c050375dd56151b7a0da69cdce the STA mode
channel change was added in disconnected state for spectral scan
test at CV2X platform.

Now with iwpriv wlan0 setMonChan on STA mode, a monitor mode
pe_session is created in PE/LIM which take ref count with
WLAN_LEGACY_MAC_ID. As the interface is STA type this session
is not deleted when vdev is deleted. This lead to vdev ref leak.

This code is broken and is no longer in use and cause vdev
ref leak when executed. Thus revert
Ie9ffc701d93ed1c050375dd56151b7a0da69cdce.

Also move the lim session create to hdd_set_mon_rx_cb during
vdev create, as it is deleted during vdev delete.

Change-Id: Ib60aa2bd2746a8cd17f20efa7506c18784a42630
CRs-Fixed: 2557160
2019-11-02 12:25:34 -07:00
Amruta Kulkarni
5b738c23a3 qcacld-3.0: Remove wma_txrx_node params(tx_power,max_tx_power)
Target_if cleanup done for tx_power,max_tx_power params
 Use vdev_mlme_mgmt_generic params(tx_power,maxregpower) instead

Change-Id: I3dc30bbce0026dc88f83009671851a70c1495b30
CRs-Fixed: 2555402
2019-10-31 22:30:18 -07:00