Commit Graph

3420 Commits

Author SHA1 Message Date
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
Himanshu Agarwal
bdc776f92e qcacld-3.0: Change ce_service_max_yield_time ini to us granularity
Change ce_service_max_yield_time ini to us granularity to have
yield time of us order as well.

Change-Id: Ib9e421ad61b660194459c2ee44b2d36a07a21e61
CRs-fixed: 2086153
2018-04-28 12:57:24 -07:00
Poddar, Siddarth
04eed33241 qcacld-3.0: Add ini support to change ce service max rx indication flush
Add ini support to change ce service max rx indication flush num
to handle given number of rx indication at a time to maintain
napi yield timelines. This is used to tune the yield time based on
system needs.

Change-Id: Ib66f23c83d64f2bc16a352067816512c3d8defef
CRs-Fixed: 2068367
2018-04-28 12:57:21 -07:00
Dustin Brown
c88e596903 qcacld-3.0: Removed unused sme_config in __iw_setint_getnone()
__iw_setint_getnone() allocates and frees an instance of
tSmeConfigParams, which is unused. Remove this local variable.

Change-Id: Iad8383ad4bd95978ac74b5a177923be14c45f0c0
CRs-Fixed: 2232057
2018-04-26 18:24:17 -07:00
Dustin Brown
d90f61a13c qcacld-3.0: Extract WE_SET_11D_STATE handling
Extract the sub-IOCTL handling for WE_SET_11D_STATE into its own function.

Change-Id: I879ea977e23945aa7d85a6f9ebb3194d9761fd0c
CRs-Fixed: 2232056
2018-04-26 18:24:15 -07:00
Dustin Brown
65a6f0d27f qcacld-3.0: Extract WE_SET_CHWIDTH handling
Extract the sub-IOCTL handling for WE_SEG_CHWIDTH into its own function.

Change-Id: I8bc027fad3f24f1601d4b2f97e2a485b10cb7111
CRs-Fixed: 2232055
2018-04-26 18:24:12 -07:00
Himanshu Agarwal
24aa27ea06 qcacld-3.0: Add ini support to change ce service max yield time
Add ini support to change ce service max yield time, so that we can
tune the napi SWI context of execution based on the system needs and
add a variable in napi stats to record max time taken in NAPI poll.

Change-Id: Id2b47bcecb777b98e0b1192135ae140b681d387d
CRs-Fixed: 2055074
2018-04-26 13:12:07 -07:00
Ashish Kumar Dhanotiya
f974f3355f qcacld-3.0: Avoid duplicate MAC configuration
Currently if the MAC is changed dynamically for any interface,
driver is allowing to configure a MAC which is already in use by
some other interface and it will allow different interfaces to
come up on same MAC address.

To address this issue add a check to configfure only different
MAC address.

Change-Id: Iece3bb063be30d5d983f4bec710d6d16b22bd2f9
CRs-Fixed: 2227656
2018-04-26 07:18:15 -07:00
Himanshu Agarwal
51d818cb2a qcacld-3.0: Don't fill any WMA request if target is not ready
If any WMA request is queued in wma hold req/vdev resp queue after fw
has crashed and sent the corresponding uevent to HOST, request will
timeout and if at the same time, SSR is also going on, it may lead to
various issues and crashes.

Check whether target is ready or not before queuing any request
in wma hold req/vdev resp queue.

Change-Id: I358841566f858e115b3b04f12f4d8b70b75d1dfc
CRs-Fixed: 2226497
2018-04-26 06:19:18 -07:00
Ashish Kumar Dhanotiya
eff05f1de1 qcacld-3.0: Update Tx aggregation INIs to Internal
Update the usage type of gTxAggSwRetryBE, gTxAggSwRetryBK,
gTxAggSwRetryVI, gTxAggSwRetryVO, gTxAggregationSizeBE,
gTxAggregationSizeBK, gTxAggregationSizeVI, gTxAggregationSizeVO
from external to internal.

Change-Id: Idd4c6d9f3c03fef9e3d3600871c20ad419bac6b0
CRs-Fixed: 2230035
2018-04-26 04:07:21 -07:00
Jingxiang Ge
95912f8be5 qcacld-3.0: Fix memory leak when cds_pre_enable fails
runtime lock/pdev/pdev object are allocated when receive
rx ready event. If cdp_pdev_post_attach fails in cds_pre_enable,
such resources are also needed to release.

Change-Id: I549567d1125ce3b28c0ce6f3a9bda62e6209be09
CRs-Fixed: 2222363
2018-04-26 00:58:16 -07:00
Yun Park
a29974a3ae qcacld-3.0: Remove IPA uC stat log when IPA pipe is suspended
There's an excessive log for IPA uC stat request reason even when
WDI pipe is suspended.
Enable IPA uC stat request reason log only when IPA pipe is resumed.

Change-Id: I35d98e02a9180738bc9cdb25f59e31d572df9e0e
CRs-Fixed: 2181952
2018-04-25 07:36:19 -07:00
Rajeev Kumar Sirasanagandla
92ec9d9742 qcacld-3.0: Avoid log of user buffer in GETIBSSPEERINFO IOCTL
While processing GETIBSSPEERINFO IOCTL command, respective handler
drv_cmd_get_ibss_peer_info() is logging user-buffer which can cause
page fault error.

To fix this, log local buffer (extra) instead of
user buffer (priv_data->buf).

Change-Id: I6260120690c4715de31fe0f9404aa5928c0feb49
CRs-Fixed: 2227050
2018-04-25 06:26:48 -07:00
Yun Park
21ec490dbd qcacld-3.0: Cleanup interface when loading/unloading timeout
When AP_DISCONNECT event occurs during IPA resource unloading in
progress, timeout could happen since suspending FW IPA Rx pipe took much
time. This could cause a subsequent AP_CONNECT event failed since no
interface is available.
Fix this by
- Adapter struct sanity check using hdd_validate_adapter()
- Call hdd_ipa_cleanup_iface() for AP_DISCONNECT/STA_DISCONNECT event
  in loading/unloading timeout case
- Assert when no interface is available in hdd_ipa_setup_iface()

Change-Id: Ie96e4f0e96ccffacf4ce5fcc976636c440214873
CRs-Fixed: 2208347
2018-04-24 22:50:00 -07:00
Naveen Rawat
23183d6c73 qcacld-3.0: Add kernel dependent macros for STA_INFO attributes
Depending on kernel version attrbutes NL80211_STA_INFO_XXX or
STATION_INFO_XXX are being used to update necessary infomation
to user space. Define macros as per kernel version and avoid
usage of kernel version macro within functions.

Change-Id: Ia265fd90d3a3ab8e6431fceb37980778a046c545
CRs-Fixed: 2223575
2018-04-24 20:50:24 -07:00
Jeff Johnson
f367ac732a qcacld-3.0: hdd: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: I616925db8255eb2f1e327cd2ddb3da70d47ca943
CRs-Fixed: 2229655
2018-04-24 14:48:31 -07:00
Naveen Rawat
ea1ece81ab qcacld-3.0: Ensure two NDI mac address are only 1 bit apart
As per customer requirement in case 2nd NDI is coming up with mac
randomized, make sure its mac address is just 1 bit apart from first
NDI's mac address.

Change-Id: Ifd3d480e4bd3bd74019bd19f23fa8a04b5f8bec5
CRs-Fixed: 2187677
2018-04-24 14:48:18 -07:00
Ashish Kumar Dhanotiya
8bfef12b87 qcacld-3.0: Add logging info for dynamic MAC change
Add logging info when the MAC is dynamically changed.

Change-Id: If602377f5242ed49a8ead4f71d3d8f1bd989f61a
CRs-Fixed: 2215053
2018-04-24 09:04:06 -07:00
Ashish Kumar Dhanotiya
959b38c51a qcacld-3.0: Add ini to control for Secondary Retry Feature
Add ini "gEnableSecondaryRate" to Enable/Disable control
for Secondary Retry Feature Set.

It is a 32 bit value such that the various bits represents
different values.

Change-Id: I1348465932f32ee19cd3efb2347ca8d2f59e0904
CRs-Fixed: 2219933
2018-04-24 09:04:03 -07:00
Paul Zhang
33fae2710d qcacld-3.0: Config number of TX sw retry per AC
Video/audio wireless application needs to tune parameters
per AC based. Config the number of TX sw retry per AC via
driver INI configuration file. It helps to improve the
video/audio performance in noisy environment.

Change-Id: Icffb5174b265b6453021b0d0a8ad3e12b695847a
CRs-Fixed: 2212954
2018-04-24 04:26:06 -07:00
Paul Zhang
ee09f8eefd qcacld-3.0: Configure the A-MPDU subframe per AC
Video/audio wireless application needs to tune parameters
per AC based. Configure A-MPDU subframe parameter per
AC via driver ini configuration file.

Change-Id: Id63be7aacf6465edee08f7a2f4c8a119f9bd6346
CRs-Fixed: 2212932
2018-04-24 02:30:41 -07:00
Jeff Johnson
b9d65f24a3 qcacld-3.0: Relocate hdd_reg_set_band()
Function hdd_reg_set_band() is currently located in wlan_hdd_wext.c,
but this function is independent of wireless extensions, so relocate
it as part of the plan to omit wlan_hdd_wext.c from the build when
wireless extensions is not enabled.

Change-Id: Ia1a359a7781bef6017baf17c8be53c2f9bab2517
CRs-Fixed: 2229769
2018-04-23 22:19:00 -07:00
Jeff Johnson
d81ab0571c qcacld-3.0: Relocate hdd_wlan_get_ibss_mac_addr_from_staid()
Function hdd_wlan_get_ibss_mac_addr_from_staid() is currently located
in wlan_hdd_wext.c, but this function is independent of wireless
extensions, so relocate it as part of the plan to omit wlan_hdd_wext.c
from the build when wireless extensions is not enabled.

Change-Id: If005f7c2295a519b891d3718799f6f826d59e97f
CRs-Fixed: 2229490
2018-04-23 22:18:57 -07:00
Jeff Johnson
11ba331f28 qcacld-3.0: Relocate wlan_hdd_set_filter()
Function wlan_hdd_set_filter() is currently located in
wlan_hdd_wext.c, but this function is independent of wireless
extensions, so relocate it as part of the plan to omit wlan_hdd_wext.c
from the build when wireless extensions is not enabled.

Change-Id: I7377806ad27ec8d6fa361523d290156a7facacac
CRs-Fixed: 2228938
2018-04-23 22:18:54 -07:00
Naveen Rawat
e8b1b82e17 qcacld-3.0: Add implementation of get_tx_power
Add changes to support get tx power from within stats
component.

Change-Id: Ifafee77033b8db75e6c9ad201a26ba8bbe72efd4
CRs-Fixed: 2210333
2018-04-23 22:18:51 -07:00
Naveen Rawat
3ff5cff23e qcacld-3.0: Add implementation of get_wake_lock stats
Add changes to support get wake lock stats from within cp_stats
component.

Change-Id: I93855e4a1635afa97b4d5235ddb9cd92654f943d
CRs-Fixed: 2210330
2018-04-23 22:18:48 -07:00
Dustin Brown
ee22071a17 qcacld-3.0: Use total_len in drv_cmd_p2p_dev_addr()
Avoid userspace overwrite in drv_cmd_p2p_dev_addr() by intersecting the
max output buffer size with the total length of the userspace buffer.
This avoids the overwrite in cases where the allocated userspace buffer
is smaller than the max output buffer size.

Change-Id: I55c6d4b277e5964a7978daceffbe4eb72014c06d
CRs-Fixed: 2222846
2018-04-23 12:44:15 -07:00
Jeff Johnson
fc8c353cda qcacld-3.0: Relocate HDD Information Element macros
Currently wlan_hdd_wext.h defines some IE-related macros, but these
macros are independent of wireless extensions, so relocate them as
part of the plan to properly featurize wireless extensions.

Change-Id: I34b2b220087e946f662741fe549a980884b97842
CRs-Fixed: 2227954
2018-04-21 06:42:29 -07:00
Jeff Johnson
d9952752e0 qcacld-3.0: Relocate wlan_hdd_set_mon_chan()
Function wlan_hdd_set_mon_chan() is currently located in
wlan_hdd_wext.c, but this function is independent of wireless
extensions, so relocate it as part of the plan to omit wlan_hdd_wext.c
from the build when wireless extensions is not enabled.

Change-Id: I187305c1f01c7a3cb72f55a0ee885c4f4f0277aa
CRs-Fixed: 2227097
2018-04-21 06:42:25 -07:00
Dustin Brown
c8e96f1746 qcacld-3.0: Use total_len in drv_cmd_get_ibss_peer_info_all
Avoid userspace overwrite in drv_cmd_get_ibss_peer_info_all by
intersecting the max output buffer size with the total length of the
userspace buffer. This avoids the overwrite in cases where the allocated
userspace buffer is smaller than the max output buffer size.

Change-Id: I77f25c50bbe9d0b966a5c319297e3e2dca4b6280
CRs-Fixed: 2222879
2018-04-19 22:06:35 -07:00
Naveen Rawat
e02f8f541c qcacld-3.0: Move hdd_request_manager to qcacmn osif layer
Move hdd_request_manager to qcacmn osif layer, which will be
used by CP_STATs component.

Change-Id: Iab64ebb837d7c2c7411905b84306fbb9990a4bac
CRs-Fixed: 2220069
2018-04-19 22:06:31 -07:00