Граф коммитов

3646 Коммитов

Автор SHA1 Сообщение Дата
Basamma Yakkanahalli
51ddfbcbee qcacmn: iwpriv txrx_fw_stats support halphy stats
Added TXRX_FW_HALPHY_STATS to support txrx_fw_stats
for halphy stats.

Change-Id: I93a9c9e3199c7c163cd6e93d28acb4e757c1e3eb
CRs-Fixed: 2114152
2017-11-06 00:50:50 -08:00
Surabhi Vishnoi
6f752b487b qcacmn: Check target address boundary before access
Athdiag procfs entry does not have address sanity check, this is
resulting in invalid ioread32/iowrite32 if out of PCIE BAR address
is used.

Fix this by allowing address with in PCIE BAR range.

Change-Id: I8365eacca7ccc4f489b7d0bda6c998384d0fec7b
CRs-Fixed: 2112270
2017-11-05 20:37:06 -08:00
Zhu Jianmin
5b55c8e857 qcacmn: wlan_serialization_activate_cmd activates first cmd only
wlan_serialization_activate_cmd() always activates first command from
active queue which creates issue for scan command related operations.
This issue has been brought in through:
I8c63dd15d7ab8612a87950a3c189e73d1436c26a
When there are multiple scan commands put in to active queue,
wlan_serialization_activate_cmd() will keep pulling first command and
activates it.
Fix: Enhance wlan_serialization_activate_cmd() API to activate the
command which has been put in a active queue.

Change-Id: Id72449cbee81b65977070a8bbec8e417eb2bb655
CRs-Fixed: 2136142
2017-11-05 18:38:36 -08:00
Abhijit Pradhan
7383ef9d7e qcacmn: Fix compilation issues for DFS component disable/enable
Header files are included in appropriate places to avoid compilation
errors. To disable/enable DFS component from non-common code at
compile time, use macro QCA_DFS_COMPONENT_ENABLE in config  file.

Change-Id: I0d4fe27ee0d76412c109aa3f64485ea1ac2a5e3a
CRs-Fixed: 2134355
2017-11-05 04:45:51 -08:00
Tushnim Bhattacharyya
17a90d0b7d qcacmn: Stop the opportunistic timer when hdd stop happens
Stop the opportunistic timer & take action if needed when hdd stop
happens. Also, take action when set_hw_mode request to FW times out.

Change-Id: I32f1e38e93a5805e0d85b800cc4e070cd6f79669
CRs-Fixed: 2133388
2017-11-04 06:59:56 -07:00
Shashikala Prabhu
0ea0a2466e qcacmn: Add random channel debug bit mask
Add WLAN_DEBUG_DFS_RANDOM_CHAN bit mask to enable/disable
random channel algorithm prints using DFS logging.

Change-Id: I77f01afcf59b8b790404eca8caa68c150a5d3ec2
CRs-Fixed: 2120265
2017-11-04 06:59:54 -07:00
Shashikala Prabhu
2427663f1f qcacmn: Cleanup old random channel function
Removed WIN based random channel selection algorithm.
To choose a new random channel, use converged random
channel  algorithm.

Change-Id: I0ece0cb71ffeb694c9f5264d97a25e49d59b1ae8
CRs-Fixed: 2120265
2017-11-04 06:59:52 -07:00
Shashikala Prabhu
68431d3ea5 qcacmn: Add support to use new random channel algorithm
1) Add support to use new random channel selection algorithm
   from converged DFS component.

2) Move random channel filtering flags from dfs_internal.h to
   dfs_ioctl.h as these flags are common between MLME and DFS
   component.

Change-Id: I5ef789dd9e9c28706f1c581997a646a80caec5ee
CRs-Fixed: 2120265
2017-11-04 06:59:50 -07:00
Ganesh Kondabattini
1b30f135af qcacmn: Set weight of DFS/passive channels in pcl to 0
If force SCC is set and SAP is active then all DFS/disabled
channels in PCL should have 0 weight to avoid the STA roaming
to these channels.

Change-Id: I4519c29477c5108f5131b7caa806505b69efea8b
CRs-Fixed: 2135750
2017-11-04 06:09:13 -07:00
Soumya Bhat
606fb3902c qcacmn: Parse received PPDU stats TLV appropriately
num_msdu, qos and ppdu_type were being parsed incorrectly.
Parse them appropriately.

Change-Id: I665285bc0b628fd1d9459473d18ef62577bbd54e
CRs-Fixed: 2133732
2017-11-04 06:09:11 -07:00
Abhijit Pradhan
c5fc03dc59 qcacmn: Fix DFS component KW issues
Fix KW issues for DFS component.

Change-Id: I9285c79e33f637d99c765e76dff35609235f1255
CRs-Fixed: 2136241
2017-11-04 06:09:09 -07:00
Shashikala Prabhu
679a8798c4 qcacmn: Fix Regulatory component KW issues
Fix Regulatory component KW issues.

Change-Id: I818913cc5e4dfc49e110e8fbe4d7a56c23508b7d
CRs-Fixed: 2136241
2017-11-04 06:09:07 -07:00
c_cgodav
bd9ecaee84 qcacmn: Add enum for ACS Ranking iwpriv
Added iwpriv ENUM for ACS Ranking feature enable/disable

Change-Id: I7a7289f458adacb7890bfbdbdaf5528c4016a7c0
2017-11-04 06:09:05 -07:00
Sathish Kumar
322b4cb4c5 qcacmn: Add support for periodic chan stats config command
Add support for sending periodic chan stats config command to target. Once
configured, host will receive the channel stats periodically as per the
configured period

Change-Id: Ic2b4692d0e2662ca590b925732f6cb33aac7a6de
CRs-Fixed: 2136759
2017-11-03 15:58:53 -07:00
Zhu Jianmin
2255930af5 qcacmn: Fix logic and no return issue in wlan_serialization_stop_timer
wlan_serialization_timer can't be stopped before destroy it
always log: wlan_serialization_stop_timer: nothing to stop
No return in end of function

Change-Id: Ie40d8513ab5d7e84f21aebe720365d32b8205ea9
CRs-Fixed: 2133196
2017-11-02 05:48:37 -07:00
Kiran Kumar Lokere
584e6617ca qcacmn: Enable scan mac randomization if user cfg is set
Enable scan randomization only if gEnableMacAddrSpoof
configuration is enabled

Change-Id: I1b9accb7fe1049ee6c5dda2a4f5920c0908196ff
CRs-Fixed: 2104796
2017-11-01 14:39:19 -07:00
Zhu Jianmin
959cb86f82 qcacmn: Fix stability caused by unwanted recursive calls in serialization
Issue description: When wlan_serialization_dequeue_cmd() gets called, it
will remove the command from active queue and try to move next pending
command from pending queue to active queue. But before it moves this
pending command to active queue completly, it calls the caller and
notify that command is activated through callback.
If that callback returns failure then serialization abandon the process
of moving it from pending to active. Now it again picks the same command
from pending and repeat the process. This creates unwanted recursion and
reference count mistakenly decremented multiple times.

Here is the recursion stack:
  (a) wlan_serialization_move_pending_to_active()
    (b) wlan_serialization_enqueue_cmd
      (c) wlan_serialization_add_cmd_to_given_queue
        (d) cmd_list->cmd.cmd_cb() fails
          (e) wlan_serialization_put_back_to_global_list
            (f) go back to (a) and repeat
Fix: Divide wlan_serialization_enqueue_cmd() API's logic in 2 parts.
1) Enqueue the command first through wlan_serialization_enqueue_cmd()
   This ensures that command has been put in to given queue.
2) Once command has been put in to given queue and if this queue happen
   to be active queue then activate the command through
   wlan_serialization_activate_cmd()
Here is the stack after the fix:
  (a) wlan_serialization_move_pending_to_active()
    (b) wlan_serialization_enqueue_cmd
      (c) wlan_serialization_add_cmd_to_given_queue
        (d) returns WLAN_SER_CMD_ACTIVE or !WLAN_SER_CMD_ACTIVE
  (a1) if (WLAN_SER_CMD_ACTIVE)
    (b1) wlan_serialization_put_back_to_global_list() for pending cmd
      (c1) wlan_serialization_activate_cmd()
        (d1) if fail
          (e1) wlan_serialization_put_back_to_global_list for active cmd
             (f1) then repeat from (a)
        (d2) if pass then return
  (a2) if (!WLAN_SER_CMD_ACTIVE) then nothing to be done.

Change-Id: I8c63dd15d7ab8612a87950a3c189e73d1436c26a
CRs-Fixed: 2132975
2017-11-01 14:39:17 -07:00
Dustin Brown
bbba9176f8 qcacmn: Set the initial wake flag on MSI resume
When the wlan driver is suspending, the last thing it does is check to
see if the firmware has indicated a wakeup during the suspend process.
This is done by checking the initial wakeup flag, which is set when a
specific copy engine payload is received from firmware. For the new
dedicated wake MSI, only the wake signal is received, no payload. When
the wake MSI is toggled, set the initial wakeup flag to prevent race
conditions during the suspend process.

Change-Id: Id53cc7884431a437136d8dca068449bc5a25b87c
CRs-Fixed: 2133469
2017-11-01 13:57:00 -07:00
Rajeev Kumar Sirasanagandla
b851d10868 qcacmn: Add support to query RCPI info
RCPI is measure of received RF power in the selected channel for a
received frame and is measured at the antenna connector and shall be
measured over an entire frame. It is a monotonically increasing,
logarithmic function of received power level.

Wlan firmware computes RCPI.

Add host support to query firmware for RCPI information of
peer mac address in sta, p2p client, softap and p2p go modes.

Change-Id: I27fe45e993bd9b157fe33ca08a56330c1c950d16
CRs-Fixed: 1093187
2017-11-01 13:56:58 -07:00
Paul Zhang
52ae099d0b qcacmn: Inc the peer->peer_objmgr.ref_cnt in time
There is a race condition: during the peer is created and invoking
qdf_atomic_inc to increase the ref_cnt, another thread may firstly
use it by wlan_objmgr_peer_get_ref and wlan_objmgr_peer_release_ref.
Then wlan_objmgr_peer_obj_destroy was called and WLAN_OBJMGR_BUG(0)
happens.

Change-Id: Ic15bada7c70d799f808fe980ae52d4862789fe11
CRs-Fixed: 2133929
2017-11-01 13:56:56 -07:00
Paul Zhang
66698093e1 qcacmn: fix spinlock paring issue
spin_lock/spin_unlock is not pairing.

Change-Id: Ib2cb73f542deee8bf4217daa731af49d07eaf7be
CRs-Fixed: 2105081
2017-11-01 13:17:26 -07:00
Manjunathappa Prakash
449a2a0425 qcacmn: Separate TcpDelAck and TcpAdvWinScale
Separate tcp-delayed-ack and tcp-advanced-window-scaling triggers
so that these system parameters can be set separately.

Change-Id: If2f869243152e698409e8a38459f5fabe44f35cb
CRs-Fixed: 2133069
2017-10-31 17:39:11 -07:00
Deepak Dhamdhere
7e0b8ba31a qcacmn: Create roam debug log infrastructure
Add a circular buffer to hold roaming related debug log information
for peer and vdev operations in the driver. Purpose is to dump
this information after host or target crash. 256 entries will go
back much deeper into history than dmesg or wlan driver logs found
in crashScope. Information is dumped out as error messages from
crash detection points as necessary.

The support routines help to store the debug logs and dump them,
typically after peer related timeout or assert.

wlan_roam_next_debug_log_index () - Utility routine to compute next index
wlan_roam_debug_log() - Adds a log entry
wlan_roam_debug_string() - Returns debug log type string
wlan_roam_debug_dump() - Dump all wlan roam debug log records

Add new QDF module ID QDF_MODULE_ID_ROAM_DEBUG.

CRs-Fixed: 1116078
Change-Id: If2077f560405ec0414d08ef4ece0fb0d2db2ccc7
2017-10-31 17:39:09 -07:00
c_manjee
dce1481493 qcacmn: Send Grat-ARP Keep Alive request to FW
Setting Gratious ARP request through iwpriv command is
not supported.

Add condition to set Gratious ARP request as method in
Keep Alive functionality

CRs-Fixed: 1114602
Change-Id: I299d39131e7ab0ebae6bd10f41bc4549debda048
2017-10-31 17:39:07 -07:00
Amar Singhal
287c86433e qcacmn: Check for buffer overflow for diag messages
Check for buffer overflow from diag messages.

Change-Id: I5ff85b24b0e26393343dc4cc4c41a9f84e6ba8e9
CRs-Fixed: 2129586
2017-10-31 17:39:04 -07:00
chenguo
23b6502d88 qcacmn: Fix memory leak for RX path of SDIO WLAN
There is a memory leak for RX path of SDIO WLAN if skb allocation
fails. Add condition check and free all resources for scenario.

Change-Id: Ic4a58d3d4e93f1d6d57bfb045dfdeb131b24f72a
CRs-Fixed: 2128051
2017-10-31 17:39:02 -07:00
Poddar, Siddarth
9f7b297a38 qcacmn: Remove code related to mmap functionality for pktlog
Remove the code related to mmap functionality for pktlog
as it is no longer used/required.

Change-Id: Ib031148985055201810a7c32347c2e6efea57f35
CRs-Fixed: 2133878
2017-10-30 07:38:07 -07:00
Sarada Prasanna Garnayak
e9f0e9c77f qcacmn: add device pointer in pld snoc API
Add device pointer in all pld snoc API to support
for numerous WLAN module.

Change-Id: I2e3a296d9b40f14633e0f6e1ed6392536d854552
2017-10-30 05:38:26 -07:00
Soumya Bhat
d34799deb2 qcacmn: Add EXT NSS Signaling support for legacy platform
Add EXT NSS Signaling support and related defintions for
legacy support

Change-Id: I332098cd681080316a7f4c03415cf68ae69f2549
CRs-Fixed: 2122207
2017-10-30 05:38:24 -07:00
Poddar, Siddarth
658455b413 qcacmn: Restrict max/min pktlog buffer size using pktlogconf tool
Restrict the pktlog buffer size to a minimum of 1MB and maximum
of 16MB using pktlogconf tool or through sysctl command.

Change-Id: I1c67ed724c512f57c5d6e555be14b0b0e23d203f
CRs-Fixed: 2133723
2017-10-30 03:25:50 -07:00
Edayilliam Jayadev
a9919d6e12 qcacmn: Changes to wext interface for external acs
Private ioctls for external acs operation like
set icm active, get channel load info, clear chan load info,
get nominal noise floor were transported and
handled by spectral module. We seperate this ioctls
from spectral by adding new IWPRIVs(get_icm_active,
set_icm_active, get_nominal_nf, clear_chan_info)and
moving their handlers out of spectral.

CRs-Fixed: 2126313
Change-Id: I8c6b56b85d566f5bc7f6217f6fbc99fa23171cdd
2017-10-30 01:39:07 -07:00
Gyanranjan Hazarika
409dc097be qcacmn: Enable sending vdev-param HEOP to target
It is required to send vdev-param HEOP to the target with
updated bss-color to enable HE BSS Color feature. Add
necessary code to support this.

Change-Id: I826bc5387dad8d044abcbc9cbdf69e93b59beb39
CRs-fixed: 2126605
2017-10-29 15:25:23 -07:00
Ganesh Kondabattini
948539c1d3 qcacmn: Go for DBS scan if atleast one session is connected
In coex mode, BT throughput test cases are getting effected as
driver is selecting non-DBS scan policy for directed scan requests.
FW is going to use only one MAC for scan when performing non-DBS
scan which inturn increases the total scan duration.
This increase in total scan duration has effect on BT throughput
test cases.

Select DBS scan policy if atleast one session is in connected
state.

CRs-Fixed: 2084608
Change-Id: I6fba26accbaed4d57c6c56a782e570b534af43c4
2017-10-29 07:25:15 -07:00
Ganesh Kondabattini
ef8506f32a qcacmn: check for directed SSID and BSSID
Update dbs scan policy as HDD_SCAN_DBS_POLICY_FORCE_NONDBS if
the scan request is for directed SSID or directed BSSID.

CRs-Fixed: 2084612
Change-Id: I9d720770e2e364ca5cb01bb5fe137f7248593398
2017-10-29 07:25:13 -07:00
Amar Singhal
009d7f1ab2 qcacmn: Add size checks in diag_fw_handler
Correct the invalid type conversions in diag_fw_handler.

Change-Id: I930c8602c0f98d19b7276987cbb4d42e4757e267
CRs-Fixed: 2129581
2017-10-28 19:36:37 -07:00
Shashikala Prabhu
739e33f1e0 qcacmn: Do not call scheduler for PO and FO
PO = Partial Offload
FO = Full offload

If the channel list preparation is handled in the same thread
of execution then call to scheduler is not required.

Change-Id: I46bf07ac14c1101de5e00165f34e937ab939659e
CRs-Fixed: 2124580
2017-10-28 07:25:39 -07:00
Shashikala Prabhu
70f77c51bd qcacmn: Fix invalid memory free
Problem:
Memory is allocated for avoid_freq_ind in reg_call_chan_change_cbks
function and freed when avoid_freq_ind is NULL.

Solution:
Memory is freed when avoid_freq_ind is not NULL.

Change-Id: I263441c5b05755054ee581b20af191d93c3dea5e
CRs-Fixed: 2124580
2017-10-28 07:25:38 -07:00
Houston Hoffman
c6d785d033 qcacmn: Support non atomic skb allocation
Improve reliability of skb allocations from non atomic callers
by letting them sleep.

Change-Id: If5a594519902ebe549fbc1ebd8c0eb97679cdcae
CRs-Fixed: 2127770
2017-10-27 19:37:28 -07:00
Yun Park
b9a7b5ac0d qcacmn: DP logging adjustments (0)
Reduce logging level of DP prints

Change-Id: I8909110ae33f279a9e2e66ae3fa1d40936418db4
CRs-Fixed: 2118016
2017-10-27 19:37:27 -07:00
Yingying Tang
474bba0579 qcacmn: Add "static" to fix compilation error for HL bus
Add "static" before some functions which only be used in 1 file to
resolve the compilation error.

Change-Id: I5bf80fe2e124bf4258c9bfdc997a5423773ca474
CRs-Fixed: 2010227
2017-10-27 13:33:01 -07:00
Kiran Kumar Lokere
c55ea47249 qcacmn: Add knobs to configure the scan paramters
Add user configuration parameters to configure the number of
probes in scan request and probe repeate time during scan

Change-Id: I65a3734d8080d8adfe3e9ffa26905e6adc196197
CRs-Fixed: 2071697
2017-10-27 13:33:00 -07:00
Shashikala Prabhu
4105bf68a4 qcacmn: Fix channel list validation failure for Taiwan country
Problem:
In 2.4GHz Taiwan country code, channel 8 shows HT40PLUS/HE40PLUS
supported. As per latest regulatory sheet, channel 8 should
support only HT20/HE20 and HT40MINUS/HE40MINUS.

Root Cause:
When populating the master channel list, channel 12 is marked as
enabled for bw 10MHz. Therefore, for channel 8 HT40PLUS/HE40PLUS
flag is enabled.

Solution:
Channel map defines the min and max BW for each channel. The
solution here is to define the (min, max) as (20, 40)MHz instead
of (2, 40)MHz for 2GHz channels. That way, channel 12 would not
be marked as enabled for TW.

Change-Id: If208c23d1341f7fc90d6714ec09de6deafc455d4
CRs-Fixed: 2124202
2017-10-27 06:07:06 -07:00
Manjunathappa Prakash
c1e703a4cb qcacmn: Set CPU floor freq on high throughput
On high throughput mode, send a message to perfd, through
cnss-daemon, to set the min freq for perf cluster to 700 KHz,
and release it on transition to low throughput.

Goes with corresponding changes on cnss-daemon (1834087).

Change-Id: I9c5c701fa33992e44fc3bad5e58599da0b45cbd7
CRs-Fixed: 2133069
2017-10-27 01:57:54 -07:00
Sravan Kumar Kairam
26cf747681 qcacmn: Release the spin lock before return
Currently in interrupt handler of per CE, spin lock is taken for
send or receive and returns with out releasing the lock held if
target register access is not allowed. This condition will lead
to kernel panic if some other context is trying for the same lock.

Change-Id: I115f6fbb006d28097168342aa4add3526ad3939d
CRs-Fixed: 2077464
2017-10-27 01:57:52 -07:00
Frank Liu
e72a02d4e7 qcacmn: fix FT_PSK connection failure
For FT_PSK connection, we use WLAN_AKM_FT_IEEE8021X to make the
security match which causes can't find the candidate AP, the fix
is to use WLAN_AKM_FT_PSK instead.

Change-Id: Ic11fa8e47ccee04621e3bb9491f138c425c91cee
CRs-Fixed: 2131598
2017-10-26 23:48:07 -07:00
Manjunathappa Prakash
96713609aa qcacmn: Get rid of spinlock lro_unloading_lock
Spinlock "lro_unloading_lock" was required to synchronize the LRO
instance being deleted when there is LRO packet inflight.
With LRO moved to qdf and LRO is tied to hif_napi, LRO instance is
active with life time of the driver. So no need to protect via lock.

Change-Id: I06f7b43e80ddf0ce5e096351b38ce954eb634a95
CRs-Fixed: 2028318
2017-10-26 23:48:06 -07:00
Rajeev Kumar Sirasanagandla
3cbcfa519f qcacmn: Fix invalid buffer access in p2p mgmt tx processing
While transmitting p2p mgmt action tx frame, there is no check for
minimum payload length which can result in buffer over-read.

To avoid this, add check for header and payload length.

Change-Id: I9e3b4ef0878d934f3425d91bb6ea4a37b1892a3d
CRs-Fixed: 2103849
2017-10-26 23:48:04 -07:00
bings
21f4cdaee2 qcacmn: Free sdio global variables scn, ol_sc in hif_sdio_close
When BMI failed in sdio, hif_sdio_dev->claimed_ctx is not set as valid
value. Then scn, ol_sc can't be freed through hif_disable_bus as usual.

To fix this memory leak, free scn, ol_sc in hif_sdio_close.

Change-Id: I96b9b7c86ea6e84a32eec1c57c27ef042673e2e1
CRs-Fixed: 2131452
2017-10-26 21:49:14 -07:00
Amar Singhal
db8a58c97b qcacmn: Check for buffer overflow in event handler
Check for buffer overflow in send_log_supported_evt_cmd_tlv.

Change-Id: Ib4850ce1a7abb77025a0dc8a3cc9776f6550eb9e
CRs-Fixed: 2122746
2017-10-26 19:46:50 -07:00
Orhan K AKYILDIZ
6bd48f118a qcacmn: Add sanity check for pktlog msgs
Add sanity check for pktlog messages, as we have seen a single case
of inconsisten nbuf. Assert if fails.

Change-Id: I6a076c4dfaa2ff8e1972dd795cadeca1302b2c0e
CRs-Fixed: 2131952
2017-10-26 17:47:30 -07:00