Commit Graph

3450 Commits

Author SHA1 Message Date
Dustin Brown
237baeebc1 qcacld-3.0: Return success in wlan_hdd_cfg80211_register_frames
Currently wlan_hdd_cfg80211_register_frames falls through to error
handling at the end of the success path. Return success instead.

Change-Id: I28eda918d3d5858cc42ef3958abe918b9ed788e9
CRs-Fixed: 2240003
2018-05-12 01:25:39 -07:00
Himanshu Agarwal
5597208ded qcacld-3.0: Stop opportunistic timer while starting new SAP
If DBS opportunistic timer is still running while starting new SAP on
some DFS channel when STA is already present on some 2.4Ghz channel,
wrong hw mode will be set when timer expires as concurrency will only
be updated when VDEV_UP happens which will happen after at least 60
seconds in case of DFS channel. So, while starting SAP, hw mode was set
to DBS mode but on DBS opportunistic timer expiration, as VDEV_UP doesn't
happen yet, concurrency has not been updated till now causing hw mode to
reset to SINGLE_MAC resulting in DFS MCC which is not allowed.

Stop DBS opportunistic timer if running while starting new SAP to avoid
hw mode reset.

Change-Id: I9cef0ab5f6208e1822aff4a68c442d61a3f8a20e
CRs-Fixed: 2222386
2018-05-11 23:56:51 -07:00
Ryan Hsu
0e878fa952 qcacld-3.0: sanity check the cds_cfg before accessing
cds_get_ini_config() might return NULL for cds_cfg, add sanity check
before accessing it.

Change-Id: I0b9c13a75fb33931d0a098a69572b6cae2ac8621
CRs-fixed: 2232370
2018-05-11 22:39:59 -07:00
Ryan Hsu
da74332d4b qcacld-3.0: rearrange to avoid use-after-free of the skb
The skb buffer is freed after the ealier sanity and then pass along
to connectivity stats tracking. Rearragne the stats tracking into the
scope of the skb sanity to assure the skb poitner is valid before
accessing it and set to NULL after free to make sure it is cleared.

Change-Id: I08106bced48fa8f23955fd261c679a5362ddd7a6
CRs-fixed: 2232362
2018-05-11 21:12:28 -07:00
Kiran Kumar Lokere
015f77fbbb qcacld-3.0: Set AMSDU size when AMPDU is disabled
Send unit test command to set AMSDU size to FW when
AMPDU is disabled

Change-Id: I6695a5527d89fbe131036ffa4f7a4c476994dea7
CRs-Fixed: 2221912
2018-05-11 16:17:52 -07:00
Rajeev Kumar
3505ae54e0 qcacld-3.0: Clean up wlan wake lock during module exit
WLAN wake lock is created during module init but if probe
did not come from platform driver because of Q6 root/user
pd not coming up then during driver unload WLAN wake lock
is not destroyed which is leading to kernel panic because
WLAN driver is unloaded without cleaning up the wake up
source. Add fix to make sure to do hdd_deinit, pld_deinit
dispatcher_deinit and wlan wake up source deinit even if
hdd context is null because if probe did not happen from
platfrom driver then hdd_ctx will be null.

Change-Id: I213bded171b1c69da3332e84ebb0f7cbd940ef44
CRs-Fixed: 2240186
2018-05-10 18:44:45 -07:00
Sourav Mohapatra
1046049f6c qcacld-3.0: Initialize variable to prevent potential information leak
In the function drv_cmd_set_mc_rate, the variable targetRate, used to
store the value parsed from the command from user space, is not
initialized. The variable is assigned value inside a kernel API
kstrtouint that converts the string to an unsigned int. In a certain
case if the kernel API fails, it returns an error code without assigning
any value to the passed parameter. In this scenario, the variable
targetRate, still uninitialized is passed on to function
wlan_hdd_set_mc_rate where it is logged using hdd_debug. As the flow
goes on, it is then again logged using WMA_LOGE(). This might lead to
potential information leak.

Initialize the variable to zero to prevent the mentioned scenario.

Change-Id: Ideec0b1930e994f19ae8a669cd2963db4016eae1
CRs-Fixed: 2226172
2018-05-09 22:53:39 -07:00
Sourav Mohapatra
debfc5a964 qcacld-3.0: Check buff len alloc in __iw_set_packet_filter_params
In __iw_set_packet_filter_params(), a user controlled length value,
priv_data.length, is used to allocated a buffer. This buffer is then
cast to a struct pointer of struct pkt_filter_cfg type without ensuring
the buffer is large enough to hold the struct. This can lead to a buffer
overread if the user supplied size is smaller than the actual size of the
struct.

Add a sanity check on priv_data.length to ensure that the size is large
enough to hold the struct.

Change-Id: I227856484d4bd7a9b0a16a42e26febbc799f80b5
CRs-Fixed: 2228725
2018-05-09 22:53:36 -07:00
Himanshu Agarwal
1230ee0ddd qcacld-3.0: Enable fw_crash_timeout
Presently, fw_crash_timeout is disabled as a result of which if
timeout happens for any VDEV related WMI command and device goes
in bad state, no assert or recovery is getting triggered. Due to
this, device crashes at some later point of time at some random
location making debugging difficult.

Enable fw_crash_timeout and trigger recovery if recovery is enabled
otherwise assert.

Change-Id: I9e9e51cba8086bd181be28884c490f0bd77663a8
CRs-Fixed: 2229101
2018-05-09 20:22:51 -07:00
Jeff Johnson
5e492b4cb8 qcacld-3.0: Fix typo "deafult"
Replace typo "deafult" with the correct spelling "default"

Change-Id: Ieee2917cf1a094468249424dd6558acdefd237a3
CRs-Fixed: 2237730
2018-05-09 17:36:16 -07:00
Jeff Johnson
9421434405 qcacld-3.0: Remove obsolete P2P macros
As a result of P2P componentization a variety of P2P-related macros
are no longer used, so remove them.

Change-Id: I693c4f11575968ce0aae9f3ecac9e008b0dbf5b9
CRs-Fixed: 2237726
2018-05-09 16:31:24 -07:00
Jeff Johnson
118a4a05af qcacld-3.0: Fix typo "capabilites"
Replace typo "capabilites" with correct spelling "capabilities".

Change-Id: I1c84c401fd732227d63a159bea7f7f3cefacf153
CRs-Fixed: 2237725
2018-05-09 16:31:19 -07:00
Jeff Johnson
5ead5ab10f qcacld-3.0: Fix typos "sucess" and "sucessful"
Replace typos "sucess" and "sucessful" with correct spellings
"success" and "successful"

Change-Id: I30746cbab4533da9b052261fa9bb87214188138b
CRs-Fixed: 2237724
2018-05-09 16:31:15 -07:00
Jeff Johnson
ff4b683dee qcacld-3.0: Fix typo "comming"
Replace typo "comming" with correct spelling "coming"

Change-Id: I9e6927cbbca82280edc459c445c2831dd8d79ce9
CRs-Fixed: 2237727
2018-05-09 16:31:11 -07:00
Jeff Johnson
48a281a9d6 qcacld-3.0: Fix typo "accross"
Replace typo "accross" with correct spelling "across"

Change-Id: Id3a895e5dada1ff352a5ca52a80accd2c1615a71
CRs-Fixed: 2237728
2018-05-09 15:19:58 -07:00
Jeff Johnson
2cc31fdbad qcacld-3.0: Fix typo "choosen"
Replace typo "choosen" with correct spelling "chosen"

Change-Id: I58fc894783093f3d68f3b576906695a9ce201adf
CRs-Fixed: 2237731
2018-05-09 15:19:55 -07:00
Jeff Johnson
389e16bd34 qcacld-3.0: Rename fConnected
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename fConnected to align with the Coding
Style.

Change-Id: I5987e3c31aed44448a1f1843d8931daa7dfeb0fe
CRs-Fixed: 2237723
2018-05-09 15:19:51 -07:00
Jeff Johnson
e4c11db22a qcacld-3.0: Fix camelCase in tsap_Config_t
Rename typedef tsap_Config_t and the underlying struct sap_Config to
align with the Linux coding standard.

Change-Id: I6e8f8b5ab9555c7781f1acf12a0475902866300c
CRs-Fixed: 2237721
2018-05-09 15:19:47 -07:00
Jeff Johnson
acad838608 qcacld-3.0: Remove obsolete SAP ioctl structs
The following structs are obsolete so remove them:
- struct sQcSapreq_wpaie
- struct sQcSapreq_wscie

Change-Id: Ie9fdba59cf31e9a2c5e468183c1328aee439709a
CRs-Fixed: 2237720
2018-05-09 15:19:43 -07:00
Visweswara Tanuku
e6b0da58ec qcacld-3.0: RSN IE Update in case of BSS already started
qcacld-2.0 to qcacld-3.0 propagation

Beacon does not show RSN IE after disabling/enabling SAP, hence
stations does not connect back while trying to associate in WPA.

While re-enable SAP from the hostapd_cli, the start_bss is called
twice, first from wps_init which does not populate RSNIE and secondly,
through bss_setup which has RSNIE but getting ignored as the BSS is
already started.

Added the RSN IE in case of BSS already started

Change-Id: I2a67156e66e255e7c007a5925cd81b859009114e
CRs-Fixed: 2144429
2018-05-09 08:39:19 -07:00
Vignesh Viswanathan
ad47f0a2a8 qcacld-3.0: Modify callers of ObjMgr APIs to include pdev_id
wlan_objmgr_get_vdev_by_macaddr_from_psoc and wlan_objmgr_get_peer
API's definitions have been changed to include pdev_id as an
argument.

Modify the callers of these APIs to include pdev_id as argument.

Change-Id: I3d0de6a0bc1dfefbe1b3cad51ec23f703baaf3ad
CRs-Fixed: 2210728
2018-05-09 01:44:33 -07:00
Rajeev Kumar Sirasanagandla
e5582aa7ef qcacld-3.0: Avoid NULL pointer exception in (re)assoc event
In hdd_send_association_event() and hdd_send_re_assoc_event(), there is
no check of pBssDesc against NULL which can lead to NULL pointer exception.
Circumvent this issue by adding NULL check.

Change-Id: Ic3a0142b4ea3f058e8d3993fb491d418ddb8f70d
CRs-Fixed: 2232721
2018-05-08 21:33:21 -07:00
Manjunathappa Prakash
bfd1276375 qcacld-3.0: Disable TCP delack if GRO is enabled
Takecare to disable TCP delack internally if GRO is enabled.
This is required as enabling both will have adverse effect with
smaller window size and noisy scenario.

Change-Id: If91236620d87287c9b71901e9d8e3d176eebc648
CRs-Fixed: 2172652
2018-05-08 13:47:26 -07:00
Will Huang
67ce1e332b qcacld-3.0: Refine PMO wow to support legacy chip
wma_is_service_enabled can't get valid service bitmap if call in
hdd_update_pmo_config, use psoc_ctx->caps.unified_wow instead to check
pattern id per vdev and legacy d0 wow capability.

Change-Id: If7bf316f482c49253fc4b95b94e172727b27ffd1
CRs-Fixed: 2225847
2018-05-06 23:12:33 -07:00
Wen Gong
aa6d55d9e7 qcacld-3.0: Add hdd memory dump feature flag
Add config flag to enable / disable hdd memory dump feature

Change-Id: Id2994f72b595096459e65ef4da5381d6eb3b476b
CRs-Fixed: 2231695
2018-05-06 23:12:29 -07:00
Frank Liu
064ebd4a01 qcacld-3.0: Check sap restart after updated active session
When do re-association, there is obsolete data exists in policy manager
until hdd_association_completion_handler updates the active session.
If check sap restart before this, will access the wrong data.

Change-Id: Ie62f86a5d523e70b6bb81b500bd358b63ae90ea8
CRs-Fixed: 2231675
2018-05-06 22:06:21 -07:00
Sravan Kumar Kairam
86fce778a0 qcacld-3.0: Update IPA uC TXRX stats to SAP adapter stats
Update the queried IPA uC TXRX stats to SAP adapter netdev stats.

Change-Id: I34ded780e6cbeba827c6d06b45720ee16c6be231
CRs-Fixed: 2234379
2018-05-05 09:21:32 -07:00
Mahesh Kumar Kalikot Veetil
7fc48292f7 qcacld-3.0: Set proper arch dependency for NAPI
NAPI APIs in HDD are platform specific. So make these API's
conditionally compiled.

Change-Id: Id87c11da13f096d4f9ff735bbd98dcea23d52310
CRs-Fixed: 2235978
2018-05-05 03:06:16 -07:00
Rajeev Kumar
3251405396 qcacld-3.0: Initialize packet filter clear rule properly
Initialize packet filter clear rule on stack properly to avoid
using un-initialized member variables.

Change-Id: I03b129e7660ed761b03ac163fdb3e7eee58ec034
CRs-Fixed: 2119208
2018-05-04 21:46:39 -07:00
Manjunathappa Prakash
fb5f25b24a qcacld-3.0: Add GRO support to NAPI+Rx_thread processing model
GRO aggregations are hanging out of NAPI instance and We cannot use the
hif NAPI instance in Rx thread as gro_list inside NAPI is flushed out
at the start and end of NAPI poll, this will corrupt the gro_list on
which rx_thread is working. Address this concern by creating dummy
NAPI instances mapping to each hif NAPI and not scheduling them.

Change-Id: I6e1de57a669c56206a7863e86c3840bd0a9eabc1
CRs-Fixed: 2128450
2018-05-04 20:42:58 -07:00
Ashish Kumar Dhanotiya
80b01b55e4 qcacld-3.0: Disable hdd_wmm_inactivity timer
Currently api hdd_wmm_free_context free the hdd_wmm context and
this api is getting invoked from several places without disabling
the inactivity timer.
Since the timer is not disabled, when hdd_wmm_inactivity_timer_cb
is invoked it tries to access the hdd_wmm context which is already
freed and the memory is reallocated to someone else resulting to
undefined behaviour.

To address this issue, disable hdd_wmm_inactivity timer before
calling  hdd_wmm_free_context function and add a check for
hdd_wmm context in hdd_wmm_inactivity_timer_cb, if hdd_wmm context
is NULL don't proceed further and return.

Change-Id: Ib085c70b3e5a57b5cd494bc2cd21edd0580c16c4
CRs-Fixed: 2233987
2018-05-04 07:30:50 -07:00
Rajeev Kumar
9176ca4778 qcacld-3.0: Optimize console logging during cfg80211 suspend
During cfg80211 suspend there are couple of redundant log messages
which are logged on console. Change the log level to debug to avoid
logging them on console.

Change-Id: Id45cc261ec7c2c1397afa746216b090fc5d34d7a
CRs-Fixed: 2235798
2018-05-03 21:51:05 -07:00
Abhinav Kumar
e24e498ac3 qcacld-3.0: Avoid possible heartbeat failure due to Hw-DTIM
In case of STA + SAP, when STA connect to a new AP, the SAP
initiate channel switch to the new channel of the STA. During
this transition period DUT will be in MCC scenario and thus
firmware changes the TBTT of SAP to get 50% channel time.

Due to this peer STA connected to DUT-SAP may miss all 5
beacons containing CSA info and when it comes out of hw-dtim
mode after 5 beacon misses the DUT SAP has already moved to
new channel and thus as SAP is not on the old channel the peer
STA will receive Heart beat failure.

To avoid this Heart beat failure on peer STA, increases the
default value of channel switch count (g_sap_chanswitch_beacon_cnt)
to 10 to increase the probability of receiving beacons with
CSA info.

Change-Id: I2e5182c299f2a100c9919ffc123aa6b1290324f9
CRs-Fixed: 2227704
2018-05-03 12:54:54 -07:00
Yu Wang
c0b46f810d qcacld-3.0: add implementation of getting peer rssi
Add changes to support get peer rssi from within
cp_stats component.

Change-Id: I4c3d5168eeb6fa097d91eb2568e059817cab7d91
CRs-Fixed: 2222778
2018-05-03 11:46:19 -07:00
Ashish Kumar Dhanotiya
cc1d6fd6a8 qcacld-3.0: Change default value of ini "gEnableSecondaryRate"
Change the default value of ini "gEnableSecondaryRate" from
0x18 to 0x17.

Change-Id: Ieef3bf656971d809275e087be124390001b077fa
CRs-Fixed: 2234784
2018-05-03 10:42:42 -07:00
Mohit Khanna
02281da645 qcacld-3.0: add DPTRACE Enhancements - Phase 2
Change data packets printing to one line
Add msdu-id to TX packets
Increase data packets size to include the complete IP packets
Indication/print when the throttling occurs

Change-Id: I4831c517b41f81003b8d28448a3093d911ac978c
CRs-Fixed: 2157768
2018-05-03 04:43:30 -07:00
Jiachao Wu
51c9a14dbf qcacld-3.0: Return value check error in getlinkspeed
The return value check logic is wrong in __iw_get_softap_linkspeed.
Which cause get linkspeed always failed.

Change-Id: If37732867f91e2b95996614ab863953d5ed5af93
CRs-Fixed: 2232332
2018-05-02 21:46:40 -07:00
Manjunathappa Prakash
7b0ad46796 qcacld-3.0: Add GRO support for STA mode
Add GRO support and make it configurable through INI(GROEnable).
GRO and LRO are mutually exclusive. Only one of them can be enabled.
And disable GRO during following conditions
1) Low TPUT scenario
2) Concurrency cases
3) For Rx packets when Peer is not connected

Change-Id: I15535827a03953231670d4138235c4876b16e045
CRs-Fixed: 2098772
2018-05-02 04:34:52 -07:00
Rajeev Kumar
ba5dcc5518 qcacld-3.0: Remove obsolete ini item gBmpsModListenInterval
INI item "gBmpsModListenInterval" is not used and hence remove
it from source code.

Change-Id: I32cae84a200541e9028667f16736ce5394bae4b7
CRs-Fixed: 2232887
2018-05-02 04:34:49 -07:00
Yun Park
81c973e1d7 Revert "qcacld-3.0: Update IPA uC TXRX stats to adapter stats"
This reverts Change-Id: Ib6b112c8891da753be3782ff621191e5edc4d925

Change-Id: I7bfde78e67ca9c9edd9e25b69a2c55ffe1c9b87e
CRs-Fixed: 2234379
2018-05-01 16:18:48 -07:00
Arunk Khandavalli
5923cc98c8 qcacld-3.0: Dont process uevent request when the modules are closed
When the SSR is triggered after the modules are closed, uevent
notifier is trying to get the pdev which is alredy destroyed.

Reject the uevent notification if the modules are already closed.

Change-Id: I8074838b18b1e36dd67afa90125f9fbe06d32c34
CRs-Fixed: 2219843
2018-05-01 06:20:21 -07:00
Dundi Raviteja
e7b11b8721 qcacld-3.0: Possble OOB access in hdd_set_limit_off_chan_for_tos()
Currently, in __wlan_hdd_cfg80211_set_limit_offchan_param() function after
parsing the 'tos' value from incoming netlink buffer there is no check
against the max value of tos. This tos value is passsed as an argument
to hdd_set_limit_off_chan_for_tos() function where it is using as an array
index for 'limit_off_chan_tbl' variable which is limited to HDD_MAX_AC.
This may cause out of bound access.

Add check to ensure the parsed tos value is not greater than
or equals to its max value.

Change-Id: I661af1f9559d9bec627594d119423be97978ac2c
CRs-Fixed: 2222803
2018-05-01 06:20:18 -07:00
Dundi Raviteja
0a2a65bb24 qcacld-3.0: Add fallthrough comment between switch cases
Currently, there is no break statement between switch cases in
function hdd_stop_present_mode(), here first case has to
fall through the next case instead of using break statement.

Add /* fallthrough */ comment between the cases.

Change-Id: I518628fb8ee084a0ea8de5c98c18a9a6c20b2637
CRs-Fixed: 2233177
2018-05-01 03:59:09 -07:00
Jeff Johnson
46807cd264 qcacld-3.0: Add fallthrough comment in hdd_stop_adapter()
In hdd_stop_adapter() there is a switch statement where the logic for
case QDF_SAP_MODE falls through to the next case. Add a fallthrough
comment to explicitly document that this is the desired behavior as
opposed to a missing break statement.

Change-Id: I2fc7b2eeb07eb91b57d5008e74267667a5995c6e
CRs-Fixed: 2233181
2018-04-30 18:19:17 -07:00
Jeff Johnson
48c05c7fb8 qcacld-3.0: Add fallthrough comment in hdd_sme_roam_callback()
In hdd_sme_roam_callback() there is a switch statement where the logic
for case eCSR_ROAM_CANCELLED falls through to the next case. Add a
fallthrough comment to explicitly document that this is the desired
behavior as opposed to a missing break statement.

Change-Id: Ic5fd5c92d7ab421a60d56dfc7761578b554349c6
CRs-Fixed: 2233180
2018-04-30 18:19:13 -07:00
Jeff Johnson
3d72577fe2 qcacld-3.0: Correctly set channelBondingMode5GHz
In wlan_hdd_update_phymode() when the curr_band is set to BAND_5G the
channelBondingMode5GHz is not correctly set. Fix the logic which
currently has duplicated test for BAND_2G to test for both BAND_2G and
BAND_5G.

Change-Id: I70ed07d12ae891374e511905213ef7fcc7a7f1f1
CRs-Fixed: 2232919
2018-04-30 17:19:50 -07:00
Arif Hussain
67c583add9 qcacld-3.0: Add kernel backport versions
Add kernel backport versions for below kernel flag
- CFG80211_REPORT_BETTER_BSS_IN_SCHED_SCAN

Change-Id: Ie89b8c639070ffe25c4410088c0e154801f5f07d
CRs-Fixed: 2226504
2018-04-30 17:19:47 -07:00
Jeff Johnson
2a8a64f5cf qcacld-3.0: Fix data hiding violation in __iw_get_char_setnone()
Currently in __iw_get_char_setnone() while processing the
WE_GET_STATES ioctl a call is made to PMAC_STRUCT() to convert a HAL
handle into a tpAniSirGlobal (aka pMac). This is a data hiding
violation since use of pMac should be constrained to the UMAC -- HDD
should not be utilizing this data structure. And it turns out that
after PMAC_STRUCT() is called the resulting pMac actually isn't used
other than testing for NULL. Furthermore this is dead code since the
HAL handle was already tested for NULL and hence the pMac could never
be NULL at the point it is tested. So fix this data hiding violation
by completely removing the code that populates and tests pMac.

Change-Id: I73fc7c388f4482e5c483a4982231f934cc80ef6c
CRs-Fixed: 2232897
2018-04-30 17:19:44 -07:00
Jeff Johnson
00052ddea9 qcacld-3.0: Add fallthrough comment in __iw_set_host_offload()
In __iw_set_host_offload() there is a switch statement where the logic
for case WLAN_OFFLOAD_ARP_AND_BC_FILTER_ENABLE falls through to the
next case. Add a fallthrough comment to explicitly document that this
is the desired behavior as opposed to a missing break statement.

Change-Id: I9a7d84841d9d059e822ee15ee482111ca9d87caf
CRs-Fixed: 2233178
2018-04-30 17:19:41 -07:00
Sravan Kumar Kairam
9b3baba08a qcacld-3.0: Update IPA uC TXRX stats to adapter stats
Update the queried IPA uC TXRX stats to adapter netdev
stats.

Change-Id: Ib6b112c8891da753be3782ff621191e5edc4d925
CRs-Fixed: 2226666
2018-04-30 04:57:17 -07:00