Commit Graph

230 Commits

Author SHA1 Message Date
Baila, Shashikala Prabhu
0e5c6c7ec7 qcacmn: Add API get Regdomain ID
API is added to get Regdomain ID from Regdb component.

Change-Id: I78424fa4b608d00cb44033a5860403b19da0b9c8
CRs-Fixed: 2002892
2017-05-07 20:02:36 +05:30
Baila, Shashikala Prabhu
dedc15dc74 qcacmn: Add API to get country ISO
API is added to get country ISO from regDB component.

Change-Id: I264fa4ffaa87127895613ab397efbb416c440f75
CRs-Fixed: 2002892
2017-05-07 20:02:18 +05:30
Baila, Shashikala Prabhu
08fd8610b3 qcacmn: Added API to get the current country code
API is added to get the current country code from Regdb component.

Change-Id: I9c9e7027c9e99f31f72d4a0222d4db1dfa8a7baa
CRs-Fixed: 2002892
2017-05-07 20:02:00 +05:30
Baila, Shashikala Prabhu
03816f3742 qcacmn: Fix memory leak during channel list building
Free the reg rule pointers while handing error conditions.
Also free pointers when channel list building is completed.

Change-Id: I4c8d67ae191f86175f9cc684ba703fea11e66f1f
CRs-Fixed: 2002892
2017-05-07 20:01:34 +05:30
Baila, Shashikala Prabhu
ae499840fc qcacmn: Regdb Kernel panic fixed
Some countries have no reg rules. Check is added to avoid
NULL pointer dereference in cur_reg_rule.

Change-Id: I1840ca85121f0f61abab8fcf288fdde6a9ca22c5
CRs-Fixed: 2002892
2017-05-07 20:00:14 +05:30
Pradhan, Abhijit
7644ff44b0 qcacmn: Add antenna gain to per regdomain structure
Antenna gains are added to per regdomain structure. Howerver,
during parsing they are copied to per current reg rule and
finally to per channel.

Change-Id: Ib456248e2dee26ed3b2a9878d1b27fc5c9827e81
CRs-Fixed: 2002892
2017-05-07 07:16:20 -07:00
Baila, Shashikala Prabhu
f9889e58d4 qcacmn: Set country code from ioctl
The IOCTL may pass country ISO or country code or regDomain pair
ID as input. In all 3 cases, get the regrules and build master
channel list.

Change-Id: I643734dff175709853cb013b9b58365cceffd5d4
CRs-Fixed: 2002892
2017-05-07 07:15:56 -07:00
Baila, Shashikala Prabhu
9e63cb7b00 qcacmn: Set default country code
When a country code is not available from inside the device
(from EEPROM), a default country needs to be set. Also get
the regdomains from the default country code and build the
master channel list.

Change-Id: If307ad18318b2aea3fcdd149c01b39a678163bb5
CRs-Fixed: 2002892
2017-05-07 07:15:26 -07:00
Baila, Shashikala Prabhu
ae875e5d5a qcacmn: Use sizeof of reg_rule structure instead of using macro
Since the array size can be specified by a different macro or a
different value in future, let the  compiler calculate the array
size directly instead of using the hard-coded value of the macro.

Change-Id: I3fb1719db5165d0155e73c0653ec6f13fa95f69a
CRs-Fixed: 2002892
2017-05-07 07:15:06 -07:00
Baila, Shashikala Prabhu
38dba64552 qcacmn: Parse function is split to modularize code
Instead of having a large function, the parse function is
split into 3 for A)Country ISO B)CountryCode and
C)RegDomain Pair ID.

Change-Id: I5b3574cd54644d1eac13e3eff762eb7cbdd35a73
CRs-Fixed: 2002892
2017-05-07 07:14:03 -07:00
Baila, Shashikala Prabhu
7aae4615a2 qcacmn: Add the country and regdomain parse functions
Country and regdomain parse functions are added for the regDB in
host. Given a country code or ISO or RegDomain, these functions
find the regulatory rules and builds master channel list.

Change-Id: I7c632098561e3bbab1ac6ded2ae80e03d53b00bb
CRs-Fixed: 2002892
2017-05-07 07:12:38 -07:00
Amar Singhal
c2d4953235 qcacmn: Fixes for master channel list
When a new master channel list is created, populate master chan list to all
pdevs. Do not make any assumption on availability of pdevs. Make other
stability and initialization fixes. Also add extra fields to data
structures.

Change-Id: I0a59c41e9425435f6069807a3c5de0b389d8fa5e
CRs-Fixed: 2002892
2017-05-07 06:56:22 -07:00
Tushnim Bhattacharyya
87a234b5e9 qcacmn: Filter PCL with NOL
Filter the PCL with NOL before providing to the requester to avoid
including radar channels in PCL.

Change-Id: I915572f6653a6c9c98cb525c03570543cfc86e12
CRs-Fixed: 2009818
2017-05-01 13:45:13 -07:00
Abhijit Pradhan
21f852f52c qcacmn: Fill antenna gain in master channel list
Antenna gain is per regulatory structure. However we need it in
per channel during transmission. Firmware sends antenna gain per
regulatory rule. Host copies it to per channel structure.

Change-Id: Ia163f46facec03ccd450994acbeb28d1e9f2a111
CRs-Fixed: 2002892
2017-04-28 09:47:04 -07:00
Baila, Shashikala Prabhu
1cc7633792 qcacmn: regdb: HT40+ and HT40- is fixed for 2GHz
For 2GHz HT40+/HT40- band width reg_get_2g_bonded_channel_state function
always returns the state as invalid due to function argument mismatch.

Change-Id: Ida04339fcaf680807aa425b3f28c627baa317b02
CRs-Fixed: 2002892
2017-04-22 00:50:38 -07:00
Amar Singhal
c73c207412 qcacmn: Move public data structures
Move remaining regulatory public data structures to
reg_services_public_struct.h

Change-Id: I658d434c46989f90b527f7d6a8e5a4da032628f7
CRs-Fixed: 2002892
2017-04-20 15:45:06 -07:00
Amar Singhal
9749753a75 qcacmn: Add API to pass configuration settings
Add API to pass initial configuration settings to
regulatory component.The regulatory component would
re-compute initialization channel list when this API
is called.

Change-Id: I414ecd189c0879515bd9b3f07537b3143a5cb0ed
CRs-Fixed: 2002892
2017-04-16 15:58:36 -07:00
Amar Singhal
b4071431e9 qcacmn: Add new APIs to regulatory component
Policy mgr needs APIs for chan to freq and freq to chan APIs.
Add these APIs to regulatory component at pdev level.

Change-Id: I4a0cf2a4b02e16b81d24088c9e9b6c8d36ce6b6c
CRs-Fixed: 2002892
2017-04-14 13:53:36 -07:00
Amar Singhal
be6199297c qcacmn: Fix channel range for null range limits
If high limit value is not found; there can be infinite loop
for searching for it. Fix it by checking for lower limit. Also
do NULL check on extended service capabilities pointer.

Change-Id: Ie3f78e470be77b2e9b34a1003c9e273c33da21db
CRs-Fixed: 2002892
2017-04-14 05:49:08 -07:00
Kiran Kumar Lokere
54518924c3 qcacmn: Add public API to set/reset NOL channels in regulatory
Provides the public API to set/reset the NOL channel status in the
regulatory current channel list.

Change-Id: Ic04b55a88705c94aa2933ac402ba9c538147aecd
CRs-Fixed: 2002892
2017-04-03 13:47:16 -07:00
Kiran Kumar Lokere
43568a9b3f qcacmn: Fixes for regulatory channel event processing
Fix the population of tx power. Also fix the WMI TLV processing
for regulatory channel list event. Also make sure correct
range enums are calculated for pdev range.

Change-Id: Iec9559c0ab4b2b5e52d0b0a3eb4a0e8d038dc791
CRs-Fixed: 2002892
2017-04-03 13:47:15 -07:00
Amar Singhal
40c1783ccc qcacmn: Remove 4.9 ghz channels from reg component
4.9 ghz channels would be added when we do different channel
enumerations for different operating classes. Remove them now
to simplify the reg component logic.

Change-Id: Iceb199d5cc531a83b613101cdb61a78c9b0746c0
CRs-Fixed: 2002892
2017-04-03 13:47:14 -07:00
Amar Singhal
1fb9ce34b7 qcacmn: Change public APIs to pdev level
The current channel list is now maintained at pdev level. Accordingly,
change the relevant public APIs to take pdev and not psoc as an argument.
Also add operating class public APIs and other public macros needed from
regulatory component.

Change-Id: I953d254c5c438fa0aacc8eed07bda1ce16b01912
CRs-Fixed: 2002892
2017-03-30 23:23:31 -07:00
Amar Singhal
1b8762f7a6 qcacmn: Populate the current channel list by pdev
The current channel list needs to be maintained at pdev level.
Compute the current channel list when a pdev is created.

Change-Id: I4922c2d2f9145fb5acfd694f7d2d364af8e676fa
CRs-Fixed: 2002892
2017-03-30 23:23:30 -07:00
Amar Singhal
e407974144 qcacmn: Add the event handler for WMI_REG_CHAN_LIST_CC_EVENTID
Add event handler for WMI_REG_CHAN_LIST_CC_EVENTID.This handler
would be called from psoc_open object manager framework
initialization.

Change-Id: Icfd52fdb7056fdb77afdbd1be576d160719b7285
CRs-Fixed: 2002892
2017-03-27 06:07:36 -07:00
Amar Singhal
9cab88d2ab qcacmn: Populate the master channel list from firmware
Process the message WMI_REG_CHAN_LIST_CC_EVENTID. This message is used to
populate the master channel list.

Change-Id: I96d8f7ff5f71a35686ba990175c4a37995bfa6b2
CRs-Fixed 2002892
2017-03-20 18:01:47 -07:00
Amar Singhal
7b56f8d67a qcacmn: Regulatory component public APIs
Add regulatory component public APIs

Change-Id: Idc8afaf1952e831a3a9917aeef796cb7dc466152
CRs-Fixed: 2002892
2017-03-20 18:01:46 -07:00
Amar Singhal
1fd82c6c58 qcacmn: Regulatory component registration
Register the regulatory component with obj mgr. Regulatory
component only needs to listen to psoc level messages.

Change-Id: I3d060d66cb7bac2912afb1301ef1960f8bd9c0ef
CRs-Fixed: 2002892
2017-03-20 18:01:45 -07:00
Amar Singhal
2b94b1de5b qcacmn: New regulatory database
New regulatory database that is offload friendly. The
same database would be used in firmware also.

Change-Id: I4f8ee3555882fcc672d893ff544e119773dfd4c0
CRs-Fixed: 2002892
2017-03-20 14:31:23 -07:00
Amar Singhal
e2cc7069f5 qcacmn: Initial version of regulatory component changes
Define the regulatory component public APIs, private APIs and
initialization of the regulatory object

Change-Id: I536078592aa7e66e96d4dcab8efdedfd6fd03711
CRs-Fixed: 2002892
2017-03-20 14:29:22 -07:00