Commit Graph

8834 Commits

Author SHA1 Message Date
Lincoln Tran
0779b77211 qcacmn: Add regulatory API for phymode change
Add new enum in regulatory to hold all current phymodes.
Add a new API to get max allowed phymode which is not more than the
user provided phymode.

This change simplifies the phymode selection process when starting
or updating the parameters of a vdev.

Change-Id: I12c15e357b80faf2f5272800e55179f02755a263
CRs-fixed: 2658290
2020-06-03 13:33:40 -07:00
Lincoln Tran
f682392d3e qcacmn: Update country to have correct phymode map
The following 3 countries will not support 802.11ax:
1) Belarus
2) Russia
3) Ukraine

This change updates the phymode bitmap for those countries.

Change-Id: I8cd293341d82446cfb5f99eb912a925f4f3398b3
CRs-fixed: 2658290
2020-06-03 13:33:36 -07:00
Min Liu
b1e22e0cbf qcacmn: QCA vendor command for adding and deleting TSPEC
Add a QCA vendor subcommand QCA_NL80211_VENDOR_SUBCMD_CONFIG_TSPEC
to add and delete TSPEC in STA mode.
The attributes defined in enum qca_wlan_vendor_attr_config_tspec
are used to encapsulate required information.

Change-Id: Ifaba68b6619a3f6b775d2150740e7d6a2645493c
CRs-Fixed: 2686133
2020-06-03 09:27:55 -07:00
bings
2be79bf9fd qcacmn: sizeof_field support for 4.16+ kernel
sizeof_field is defined from kernel 4.16. So use sizeof_field
instead of FIELD_SIZEOF from kernel 4.16.

Change-Id: I291531ea86499a7c0ba52fbb6607b19dff533111
CRs-Fixed: 2666512
2020-06-03 09:27:52 -07:00
Min Liu
124f623a19 qcacmn: Vendor attributes for setting TX A-MSDU and RX A-MSDU parameters
Define QCA vendor attributes for SET(GET)_WIFI_CONFIGURATION to
dynamically configure capabilities for TX A-MSDU and RX A-MSDU.

Change-Id: Idcf7de2172cbf0b6710a7256b925939a2321e91c
CRs-Fixed: 2687224
2020-06-03 09:27:49 -07:00
Balaganapathy Palanisamy
a497ea80aa qcacmn: Add peer isolation support per vap
Configure the client as isolated peer if part of isolation
list while creating/associating the node or adding the peer
to the isolation list.
Do not forward the packets to and from clients in isolation
list instead accelerate to upper stack.

CRs-Fixed: 2689868

Change-Id: I67fd4dee0fb76c993746cdd66c70c241d407239a
2020-06-03 08:08:13 -07:00
Naga
30f07a9dc1 qcacmn: Fix data type for ic_irqnum
ic_irqnum saves the irq number given by platform,
existing max irq which can be saved per ce is 255,
if platform return irq greater than 255, value is
misinterpreted with that saved in a byte, this will
eventually have problem when host driver suspends/stop,
during which freeing irq will fail.

But in scenarios such as IPI mechanisms such as whunt,
since free irq fails, it would still assume irq is enabled
and call registered handlers, which will lead to
null pointer access.

Inorder to fix this changed data type to uint16_t.

Change-Id: I0d92f965462a0a6416ee3dce880c4218e5ab09e8
CRs-Fixed: 2700577
2020-06-03 08:08:11 -07:00
Lincoln Tran
d7ffb6df23 qcacmn: Update wmi_discard_fw_event
Update return type of wmi_discard_fw_event to return QDF_STATUS
to match scheduler_msg_process_fn_t.

Change-Id: Iba2d41c4bab2bfd5fb163d82fca6c6b895e5a2a4
CRs-fixed: 2699644
2020-06-02 03:22:52 -07:00
Paul Zhang
a027a582cc qcacmn: fix null-ptr-deref Read issue
Add sanity check in function target_if_init_spectral_capability
to avoid null-ptr-deref read issue.

Change-Id: Iccd79051ee8294f421704eadbedf6c9d9bf9a7b9
CRs-Fixed: 2692688
2020-06-02 03:22:49 -07:00
sheenam monga
efbca64bbe qcacmn: Add a vendor attribute to get OEM data
Add an attribute QCA_WLAN_VENDOR_ATTR_OEM_DATA_RESPONSE_EXPECTED
to get the response for the queried data.

Change-Id: Icb3fc7072cf589cf60a7c68b7c1fa74e51dadab8
CRs-Fixed: 2699102
2020-06-01 11:03:41 -07:00
Lincoln Tran
64db569708 qcacmn: Fix wifi_pos_send_rsp pointer cast
Update the wifi_pos_send_rsp function pointer cast to have the
same parameters as the actual function pointer.

Change-Id: I7e9f5f9972fe96f74c76ffb0fa069a93c98db72b
CRs-fixed: 2685627
2020-06-01 09:34:07 -07:00
Ananya Barat
9cd92dce58 qcacmn: Fill the max 5G bandwidth from the regdomains_5g table
In the current implementation the max_5g_bw was hardcoded as 160 MHz
in reg_get_max_5g_bw_from_regdomain, as this information was not
available in regdomains_5g so far.

However, the regdomains_5g table has been updated to make the maximum
5G bandwidth supported by the regdomain available. Hence updating this
information.

Change-Id: I9b9aea9a81b6b0d6f590c266e49a6b4ca3a9e32c
2020-06-01 05:23:29 -07:00
Chaoli Zhou
47e9c6a997 qcacmn: Fix htt_status & A_STATUS map dp status wrong issue
The packet tx complete status from wlan fw define in htt_tx_status
doesn't match with packet trace feature used in qdf_dp_tx_rx_status,
Meanwhile A_STATUS also doesn't convert to correct qdf_dp_tx_rx_status,
so add two according APIs to fix it

Change-Id: Ic250175dd270632f40af14ad9499ddcafbb3033b
2020-06-01 05:23:26 -07:00
Abhishek Ambure
101c1fdeda qcacmn: Send oce_subnet_id_weightage_pcnt to firmware
In struct weight_config, "oce_subnet_id_weightage" added newly.
Station uses "oce_subnet_id_weightage" as one of the parameter for
selecting AP candidate during initial connection. Host sends
"oce_subnet_id_weightage" ini value to firmware over WMI command
WMI_ROAM_AP_PROFILE.

Add oce_subnet_id_weightage in scan object scoring param to calculate
weightage based on SUBNET ID and select candidate accordingly.

Change-Id: I6583f46f661eaefabbad858bc7fb34e37443ebae
CRs-Fixed: 2675924
2020-06-01 01:37:41 -07:00
bings
3a5c2d3456 qcacmn: Fix print format error
Fix print format error in hal_rx_fst_attach

Change-Id: I45aefcedd9806279552ff25a8713c66f350fedae
CRs-Fixed: 2666498
2020-06-01 01:37:37 -07:00
bings
1d5343f48a qcacmn: ndo_tx_timeout support for 5.6+ kernel
New parameter txqueue is added for callback ndo_tx_timeout.
Add support for it under the kernel version compilation flag.

Change-Id: I0234dade56f65d15a4370404e17ff51a8a73ee4e
CRs-Fixed: 2666444
2020-06-01 00:04:14 -07:00
bings
e3fe6fc3c0 qcacmn: proc_create_data support for 5.6+ kernel
One parameter of proc_create_data is changed from struct
file_operations to struct proc_ops.
Add support for it under the kernel version compilation flag.

Change-Id: Ic87222f9c267debef56dcc66fc629854058ffabd
CRs-Fixed: 2666492
2020-06-01 00:04:11 -07:00
bings
1740435d49 qcacmn: Use ktime_get_real_ts64 for kernel 3.17.0+
ktime_get_real_ts64 is defined from kernel 3.17.0.
Use ktime_get_real_ts64 instead of ktime_get_ts from
kernel 3.17.0.

Change-Id: Ica72545fe5224966fbb350813bf3c2d849946dbc
CRs-Fixed: 2666404
2020-06-01 00:04:08 -07:00
Abhinav Kumar
5839296d1d qcacmn: Fix mem leak while deleting pmksa
Due to commit : I83e8d4c0c8b3ad503aa5894ffdc4a14bc3aeec7a,
while processing set_del_pmk command driver checks pmk_len
to delete pmk. In case if new PMK gets added with 0 lengths,
pmk entry with pmk_len = 0 will never be deleted. It is only
overwritten without freeing due to incorrect logic set_del
pmk logic.

Fix is to modify set and del pmk logic to avoid mem leak.

Change-Id: Idff573d020940dd926d07e1ec4f146eaa1215686
CRs-Fixed: 2696207
2020-05-29 19:52:56 -07:00
Jia Ding
c66705291b qcacmn: Properly set OL_TXRX_NUM_LOCAL_PEER_IDS
Set OL_TXRX_NUM_LOCAL_PEER_IDS to WLAN_MAX_CLIENTS_ALLOWED
if WLAN_MAX_CLIENTS_ALLOWED is defined.

Change-Id: Ifb5c6ab15e791f92aa8503537e624195cf3fad6d
CRs-Fixed: 2694492
2020-05-29 14:51:01 -07:00
Manjunathappa Prakash
32acca2463 qcacmn: Flush the PCIe window select config before device access
PCIe window select config reg update goes on different NoC and
actual PCIe device register access goes on the different NoC.
If there is delay in window select reg config, it can result in
access some other PCIe IO memory access and will result in actual
register write lost issue. Make sure to flush the window select
reg write before actual device reg access.

Change-Id: I1fe17aad7ae8fd5dea7a618273d9cd813b236a85
CRs-Fixed: 2687676
2020-05-29 14:50:57 -07:00
Saket Jha
d30eab103c qcacmn: Create monitor mode spinlock and add null check
Due to changes in datapath init/deinit path, mon_lock spinlock was not
getting created. Create mon_lock spinlock during
dp_rx_pdev_mon_cmn_desc_pool_init.

Add null check to validate rx_tlv_header before calling
hal_rx_mpdu_start_tlv_tag_valid.

Change-Id: I41c781de29f2c8c05ec1bfa90f9c8f742f2539bf
CRs-Fixed: 2693687
2020-05-29 14:50:54 -07:00
gaurank kathpalia
d7ec6fab20 qcacmn: Enable band preference for 6 GHZ
Enable band preference for 6 GHZ and give default
maximum weightage to 6 GHZ to push it for STA operation.

Change-Id: Id05e81ca4fb9de7653dc0291d2ffe970104849cb
CRs-Fixed: 2692068
2020-05-29 13:13:41 -07:00
Chaithanya Garrepalli
1d144f88bd qcacmn: store peer_id instead of peer_ids array in dp_peer
In lithium a peer will have only single peer_id hence remove
peer_ids array from dp_peer structure

Change-Id: Ib98270b7fd98f1199b862e4608f990687914b7cc
2020-05-29 13:13:37 -07:00
Ke Huang
b404458d20 qcacmn: Add NULL pointer check for KW issues
Add NULL pointer check in function hif_send_single() and
htc_dump_counter_info() for KW issues.

Change-Id: I4b020c566b14b28a825c13752dccf67b5f8bb837
CRs-Fixed: 2675205
2020-05-29 03:13:53 -07:00
phadiman
9789bab0d9 qcacmn: Replace dp_srng_setup with dp_srng_alloc/init in debug logs
dp_srng_setup was split into dp_srng_alloc and
dp_srng_init as part of lithium DP init and de
init improvements but the debug prints remain
unchanged

Rectify mistakes in debug prints accordingly
to match dp_srng_alloc or dp_srng_init

CRs-Fixed: 2696952
Change-Id: If6c41ffe80006852f9ac308ce65ceee69736fcb9
2020-05-29 00:28:33 -07:00
Baowei Liu
ca3412698e qcacmn: Not set "force_set" if event completed
"qdf_complete_wait_events" set force_set flag for all event in
"qdf_wait_event_list". This cause qdf_wait_for_event_completion
return QDF_STATUS_E_FAULT, even if event have completed

Add new flag "done" to record event completed. Use this flag to
detect event have completed or not.

Change-Id: I31f947169153ccbeb8435c539faab1059c055c04
2020-05-28 17:28:50 -07:00
Yu Tian
76013e1056 qcacmn: Change tx_desc, desc_ext min threshold
For DBS SAP case, need to balance the CPU cost and
TPUT KPI, use tx_descriptor size to control this can
in avoid the influence of IPA part.

CRs-Fixed: 2665268
Change-Id: I702a605b7a3156e429476f6a4d623b69bb19f615
2020-05-28 10:43:09 -07:00
Alok Kumar
163a364d27 qcacmn: Set TCP PSH flag only for the last segment of TSO packet
Currently, if TCP PSH flag is set in TSO packet then
PSH flag is set for each TSO segment in the driver.
This causes GRO flush for each segment received in the receiver side.

Set this PSH flag only in last TSO segment so that GRO flush
happens for the last segment in the receiver end.

Change-Id: I6d6b34fab71ab2984ea68d8197f2979d25b36c6b
CRs-Fixed: 2692251
2020-05-28 07:57:09 -07:00
Jianmin Zhu
0818b326b1 qcacmn: Enable firmware dump when kernel panic for Rome
Firmware dump is necessary to debug host panic issues because
host and firmware are out of sync.
MACRO DEBUG is undefined by default, after remove it,
hif_crash_shutdown->ol_copy_ramdump is called to collect firmware
dump.
Since dump depend on functions in bmi, add MACRO
WLAN_FEATURE_BMI check.

TargetFailure event wont't be received after inject assert due to
irqs disabled, so can't set target RESET state which is checked
when dump IRAM

Change-Id: Ia75f5032a2817e35e4c7e777857b137ba3998ebd
CRs-Fixed: 2682677
2020-05-27 07:04:53 -07:00
Aakanksha Doda
ae8ef356d8 qcacmn: Add a check to not process DEL_MULTISTREAM event in wait state
Add a check to make sure that WLAN_GREEN_AP_DEL_MULTISTREAM_STA_EVENT
event is not processed in wait state to avoid any disruptions in the
qdf_timer running before when WLAN_GREEN_AP_DEL_STA_EVENT event was
received.

Change-Id: I7ca04243f5faa593afb65bd41db1f4bf3a8d4e74
2020-05-26 08:02:58 -07:00
Linux Build Service Account
b1cd82186a Merge "qcacmn: Don't destroy uncreated completion_freeq_lock" 2020-05-26 04:40:45 -07:00
Gerrit - the friendly Code Review server
42fad8e2c2 Merge changes into wlan-cmn.driver.lnx.2.0 2020-05-26 04:32:46 -07:00
Baowei Liu
68487f9c5c qcacmn: Don't destroy uncreated completion_freeq_lock
Sometimes, BMI download FW fail, cause destroy this uncreated spinlock.

Because fw download fail, hif_start() not called, so 
&pipe_info->completion_freeq_lock not be created.But hif_ce_stop() call
qdf_spinlock_destroy(&pipe_info->completion_freeq_lock);Cause WLAN Panic 
@ qdf_lock_stats_cookie_destroy:824: Lock destroyed twice or never created

hif_state->started be set to true in hif_start( )This fixes use 
hif_state->started to judge hif_start() be called or not.If false, 
hif_start() not be called, so needn’t destroy  uncreated 
completion_freeq_lock

Change-Id: Id6aae8024fe9df2ac6cf7976047ebd7a850438e4
2020-05-26 01:40:47 -07:00
Tiger Yu
7d8cf5af55 qcacmn: Fix compiling error when enable HIF_CE_DEBUG_DATA_BUF
Use %zu instead of %lu for type size_t to fix the compiling error
on 32bit system when enable the HIF_CE_DEBUG_DATA_BUF.

Change-Id: Ib11cf7a798514bf654141269b2cafc6fc198a48c
CRs-Fixed: 2688568
2020-05-25 12:34:38 -07:00
Hariharan Basuthkar
4f9a6b9016 qcacmn: Add max_bw field in struct regdomain
When RD ETSI11 is configued, 5G HT40 channels are getting built for
low band channel frequencies. As per regulatory update #31,
this is not allowed.

To fix this issue, add a new field max_bw that indicates the maximum
supported bandwidth by a regdomain. Add max_bw values for all 2G and
5G regdomains definitions. Also pick bandwidth between reg-domain's
max_bw and country's max_bw.

Change-Id: Ie0e9f9c7d9ae21eea2bc534626ef7a13602577bb
CRs-Fixed: 2682424
2020-05-25 04:25:05 -07:00
Lincoln Tran
bf4490a41d qcacmn: Remove min check for channel list
Remove the min check for channel list in PNO scan as there is no
limitation in FW for number of channel. The min check is truncating
the 6G channels.

Change-Id: Ic12a82e6b1f9d22c6136abc01125f0465fe821c9
CRs-fixed: 2661087
2020-05-22 18:30:09 -07:00
Aditya Sathish
a88235db0e qcacmn: Add support for FW cap for chan_width_switch_cmd
WMI_PEER_CHAN_WIDTH_SWITCH_CMDID sent from host fragments the
command based on the size of the WMI buffer.

Add support to instead use a FW regulated value taken from the
WMI service ready extended_2 event.

CRs-Fixed: 2684788
Change-Id: Iaeccf785c64b385bf2ad6bc372da239981143fa0
2020-05-21 23:52:25 -07:00
Srikanth Marepalli
5c4527f338 qcacmn: Increase the PMKSA Cache entry size to 16 in host
Currently only atmost 3 PMK Cache entries are allowed in Host,
which is not equivalent to that of Firmware, as upto 16 max PMK
cache entries are allowed in Firmware.
This change is to support upto 16 PMKID entries in driver as well

Change-Id: I383ca79e284de4913197ca4afec317e8669edd86
CRs-Fixed: 2689482
2020-05-21 22:32:18 -07:00
Yeshwanth Sriram Guntuka
1173b39f0f qcacmn: Update peer rx mpdu count per mcs rate
Update the peer rx mpdu count per mcs rate as part
of peer stats updation.

Change-Id: I945d32c7701f5f5c9bfbbaa6ab4576b94389c84c
CRs-Fixed: 2688068
2020-05-21 20:34:59 -07:00
Gururaj Pandurangi
dce7e20f02 qcacmn: Fix possible out of bound access
In reg_set_5g_channel_params_for_freq if the input channel
bandwidth is 5MHz then while getting the next lower bandwidth
out of bound access occurs.
Fix out of bound access in getting next lower bandwidth value.

Change-Id: Ice394e68e01a5fb4c8e4098395897a8d5a1d24a9
CRs-Fixed: 2680938
2020-05-21 17:50:37 -07:00
Edayilliam Jayadev
86c7e9c3b7 qcacmn: Always populate agile frequency in SAMP message
Populate the agile frequency in SAMP message irrespective of
the current Spectral mode.

CRs-Fixed: 2688422
Change-Id: I2a897449d37a69af2144c9f9710612d6d4a13e8c
2020-05-21 14:13:52 -07:00
Jianmin Zhu
bd4a9fe637 qcacmn: Handle WMI_REG_CHAN_LIST_CC_EVENTID in worker thread
Somtimes F/W event WMI_REG_CHAN_LIST_CC_EVENTID comes for country
code changed before WMI_READY_EVENTID processed completely in
worker thread, to update current channel list,
hdd_regulatory_dyn_cbk is invoked in scheduler thread and wiphy
is extracted from pdev which isn't attached to pdev yet, assert
will happen.

WMI_READY_EVENTID and WMI_REG_CHAN_LIST_CC_EVENTID
should be serialized, both of them should be handled in same
context, such as worker thread.

Set WMI_REG_CHAN_LIST_CC_EVENTID execution context same as
WMI_READY_EVENTID: WMI_RX_WORK_CTX.

Host F/W handshake during init:

	Host <- FW WMI_SERVICE_READY_EVENTID
	Host <- FW WMI_SERVICE_READY_EXT_EVENTID
	Host -> FW WMI_INIT_CMDID
	Host <- FW WMI_REG_CHAN_LIST_CC_EVENTID
	Host -> FW WMI_SET_CURRENT_COUNTRY_CMDID
	Host <- FW WMI_READY_EVENTID
	Host <- FW WMI_REG_CHAN_LIST_CC_EVENTID

Change-Id: I922e5f2a9722e9b441cc844dd38b1039dd4d8900
CRs-Fixed: 2689274
2020-05-21 14:13:48 -07:00
narayan
2d3493959f qcacmn: Update correct Rx rate for SU Rx ppdu
Currently computation of Rx rate depends on SU MCS
and SU NSS for SU PPDU. For SU PPDU, incorrect SU NSS leads to
incorrect computation of Rx rate.
To fix this, use respective PPDU information(MCS and NSS) and
calculate Rx rate based on proper SU NSS.

Change-Id: I754a7ecd57ec02d33f211937b7ffd025278d1e05
CRs-Fixed: 2668760
2020-05-21 12:36:25 -07:00
Santosh Anbu
ef8a6e1b47 qcacmn: Define restart bitmap using qdf_bitmap
Add change to define restart bitmap using the generalized bitmap
declaration. Also use generalized function to check if any of the
bits are set in the bitmap.

Change-Id: I06859fc089f121559231a7e13bcab63322e5ef9b
CRs-Fixed: 2690914
2020-05-21 12:36:22 -07:00
Santosh Anbu
bfaf232db7 qcacmn: Use qdf_bitmap_empty to check bit status
Replace the implementation of checking bitmap status with a
standard API qdf_bitmap_empty

Change-Id: I22ee8c25c1d911f65ba4bfe235557444e6333ca4
CRs-Fixed: 2690914
2020-05-21 12:36:19 -07:00
Shwetha G K
2846a3c308 qcacmn: Capture tx status error as well in CFR stats
Capture tx status errors & cookie lookup failure under CFR stats

Change-Id: I546b70424f5fe5fafde36da3cdf587cb7ab29856
2020-05-20 23:47:41 -07:00
Manjunathappa Prakash
e4155588aa qcacmn: Get back WAR to confirm WBM IDLE ring LSB write
On Lahaina platform it is seen that WBM IDLE ring init is failing,
Write to WBM_IDLE link ring LSB write is failing.
Add temporary WAR to do back to back write of WBM IDLE link ring
LSB address config register.

Change-Id: If0c20da06bafa3037845e9806934f9e4dfbd1c1c
CRs-Fixed: 2690495
2020-05-20 15:20:09 -07:00
Shwetha G K
1347c3ab9c qcacmn: Update Pine specific CFR changes
Update Pine specific CFR changes

Change-Id: Ibdd33e458cd058f6db94de5165df31d25d97eebb
2020-05-20 00:09:20 -07:00
Shwetha G K
3b989e01df qcacmn: Add CFR Pine support
Add CFR Pine support

Change-Id: Id81df0e3e36725e4fc15e92c1ac5a967cf4883f7
2020-05-20 00:09:16 -07:00