Commit Graph

230 Commits

Author SHA1 Message Date
Shashikala Prabhu
38d5f6fc61 qcacmn: Add KOREA_ROC3 country code to regdb database
Add KOREA_ROC3 country code to regdb database

Change-Id: Ifa71577d7c0795067654128112f58a4ed9568072
CRs-Fixed: 2124070
2017-12-01 21:40:08 -08:00
Kiran Kumar Lokere
f5a56570a9 qcacmn: Fix NULL pointer dereference in regulatory object
Add NULL check for vdev pointer passed to the regulatory
component to avoid NULL pointer dereference

Change-Id: Ia49ef8ddebab42da5f28f09fb5f7b2b81d91a3b8
CRs-Fixed: 2147328
2017-11-30 05:27:52 -08:00
Shashikala Prabhu
d9bf209f70 qcacmn: ETSI 302-502 Radar Pattern for ETSI11
According to the updates of Regdomain_23 submitted on 2017-5-18,
added two pulses (ETSI 302-502) in the static ETSI radar table for
ETSI11 regdomain.These two pulses are applicable only for 5.8GHz
(greater than 5.725 GHz)  channels.

Change-Id: I2f1e5535040ced9847eedff65dbe892e4d0fb056
CRs-Fixed: 2145124
2017-11-17 07:21:06 -08:00
Shashikala Prabhu
f2e0ad8d0f qcacmn: Fix 4.9GHz channel list validation failure
Problem:
For JAPAN_48 country, channel list does not show frequency 4912, 4915,
4917 and 4920. This is because FW sends low limit 5g as 4912 which is
a center frequency of 4.9GHz channel. In the current implementation,
Host finds the low 5GHz edge frequency by subtracting 10 from channel
center frequency. For example, channel center frequency is 4912 after
subtracting 10 the low 5GHz edge frequency is 4910. Since 4910 is less
than FW low limit 5GHz (4912), Host discards 4912 frequency from it's
channel list.

Solution:
FW should send low limit 5GHz as 4910 to consider 4912 as low 5GHz edge
frequency and Host should use min and max bandwidth from regulatory
channel to calculate low 5GHz edge frequency.

Change-Id: Ib712bd6ff091a385c7dc95832f9c771e34100211
CRs-Fixed: 2124135
2017-11-11 03:25:34 -08:00
Jeff Johnson
a4262320ce qcacmn: Use enum QDF_OPMODE
Change "qcacmn: Rename enum tQDF_ADAPTER_MODE" (qca-wifi-host-cmn
Change-Id I20f1b6d1a0ab4b8fe6a85cefdff96a49e2f4652c) renamed enum
tQDF_ADAPTER_MODE to QDF_OPMODE. Update all references to use the
new name.

Change-Id: Ic6f663dac11a100f168b2626c7c0fbcaccbfca4f
CRs-Fixed: 2141061
2017-11-09 23:42:58 -08: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
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
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
Liangwei Dong
8b6b17b592 qcacmn: Fix compile error
When build driver as static module with kernel,
the reg_get_dfs_region function name conflicts
with kernel function.

Fix by rename reg_get_dfs_region to
reg_get_current_dfs_region.

Change-Id: If2908f37c338b1dbf8290d10838f53848637271c
CRs-Fixed: 2127803
2017-10-24 05:39:17 -07:00
Shashikala Prabhu
42978fd43f qcacmn: Fix channel list validation failure
Problem:
Channel list validation is failed for Algeria country code where
regulatory frequency 5660 is not present in the channel list.

Solution:
Add frequency 5660 to Algeria country channel list.

Change-Id: Ie023a4f1dd54829a891dd08ddeffb527605a0797
CRs-Fixed: 2124092
2017-10-15 05:40:40 -07:00
Shashikala Prabhu
5a8249b1ea qcacmn: Regulatory updates
Regulatory spec changes(Regdomain_23).
Added below changes:
* Add new country Gibraltar.
* Create APL19_ETSIC for India to support -5875 Channels.
* Remove legacy MKK regdomains.
* Change default Japan country mapping to Japan15.
* Add MKK16_MKKC outdoor-only regdomain.
* Add APL17_ETSID, APL23_WORLD, FCC13_WORLD, APL20_WORLD,
  FCC14_FCCB regdomain pairs.
* Assign FCC14_FCCB for PANAMA.
* Change APL14 and APL15 UNII3  power.
* Assign ETSI8 for Russia to remove DFS.
* Assign 2MHz minimum bandwidth for ETSI1 and ETSI4.

Change-Id: I59f297328fe8ff3c5ace979370ef21570560c71a
CRs-Fixed: 2081279
2017-09-25 13:21:44 -07:00
Amar Singhal
ce94494ad3 qcacmn: Initialize the channel map during DFS init
For no offload case, channel map is needed to calculate
regulatory channels. So initialize channel map when dfs region
is set.

CRs-Fixed: 2104133
Change-Id: Iee406b89429588185488acef23380b6cfa8f2af9
2017-09-21 16:41:44 -07:00
Kai Chen
7df3f4f74b qcacmn: Regulatory add 4.9 channel support
Add 4.9 channel support. Populate 4.9 channel to
channel list

Change-Id: I5a8f990fd28cba027b5200cb3dd8dc1949a7db7c
CRs-Fixed: 2105631
2017-09-19 09:59:24 -07:00
Tushnim Bhattacharyya
374c849736 qcacmn: Do not notify supplicant of 5GHz LTE avoid channel range
Do not notify supplicant of 5G LTE avoid channel range if ini
restart_beaconing_on_chan_avoid_event is set to CH_AVOID_RULE_RESTART_24G_ONLY.

Change-Id: Ide862882f4cf871688880653ec5c746e4c2dce38
CRs-Fixed: 2098933
2017-09-13 14:15:20 -07:00
Shashikala Prabhu
7b24441d5e qcacmn: Remove 5GHZ channel for FCC4
Currently WIN supports 4.94-4.99 GHz channels for US public safety.

Change-Id: Ibc9d2d37540d95162656670195a3cb3b5ba6fdc9
CRs-Fixed: 2093667
2017-09-01 17:33:08 -07:00
Shashikala Prabhu
2800a7eeb5 qcacmn: Regulatory updates
Regulatory spec changes(Country Table Changes Submitted 2016-10-31).
Added below changes:
* Update FCC2, FCC3, FCC6, FCC11, ETSI4, APL10 and APL12 txpower.
* Assign FCC Radar detect pattern to FCC2 regdomain.
* Add ETSI11 regdomain.

Change-Id: Ia93476c07063950cb43fd6e05c90dd5af089dde0
CRs-Fixed: 2093667
2017-09-01 17:33:04 -07:00
Amar Singhal
9fef21a8ce qcacmn: Add INI for 11d scan interval
The default 11d scan interval is 1 hour. But make the 11D scan interval
programmable by user to test different intervals. Therefore provide INI
for the same.

Change-Id: I36dbe8b87d4175e51bf2f275b8203ba9609a0625
CRs-Fixed: 2088739
2017-08-31 08:07:59 -07:00
Kiran Kumar Lokere
a78b4bfb67 qcacmn: Add support to process channel avoidance event
Add support to process channel avoidance event

Change-Id: I19ce742406a4778ac0f279faf0bf853bc9069eb0
CRs-Fixed: 2080241
2017-08-13 16:56:55 -07:00
Zhu Jianmin
682342a9ad qcacmn: Prevent memory violation with check
Check return value of cds_get_channel_enum

Change-Id: I945eae56a0f2d1eeeb9b37d46f03a09e60f259fb
CRs-Fixed: 2061117
2017-08-11 05:07:11 -07:00
Shashikala Prabhu
c4f7f445a6 qcacmn: Add support to enable or disable channel 144
By default channel 144 is enabled. Support added to disable
channel 144 through iwpriv command.

Change-Id: I0a193571c2ca36e0cedcac19851459448fc141cf
CRs-Fixed: 2076792
2017-08-10 04:25:51 -07:00
Shashikala Prabhu
3519b96e24 qcacmn: Fixed regdb kernel panic
Analysis:
Seen kernel panic when setting the NULL country code in FW.

Solution:
Send an indication to Offload layer if Firmware fails to set
the country code.

Change-Id: Ic01ee170cfca31d840236625c1d1497426eafc68
CRs-Fixed: 2083318
2017-08-08 02:25:47 -07:00
Amar Singhal
eea0ef4450 qcacmn: Add dynamic channel enumeration
Depending upon the operating class that the wlan device is operating
in, the channel enumeration can be different. Like in Japan operating
class,  the 4.9 Ghz channels have different numbering than the US public
safety channels in US operating class. Therefore use the IEEE80211
defined operating classes and channel numbering.

Change-Id: Id4c20b6295e5d7062a3d1a9516f7c175a9bb71f0
CRs-Fixed: 2048784
2017-08-06 00:59:37 -07:00
Shashikala Prabhu
8216667362 qcacmn: Add API to get current regdomain
Add API to get regdomain pair ID, 2GHz/5GHz regdomain,
2GHz/5GHz ctl values and dfs domain. For Partial-offload,
during country code change HOST sends these values to FW.

Change-Id: I718813d7559ea1564e0952221a881589c6f3cd0d
CRs-Fixed: 2058130
2017-07-23 13:57:18 -07:00
Abhijit Pradhan
af06bcbb63 qcacmn: Add API to get current dfs domain
Add API to get current DFS domain from regulatory component

Change-Id: Iabe4abb0966791e68130ff2d1a7305768893bfcc
CRs-Fixed: 2078153
2017-07-23 13:57:17 -07:00
Abhijit Pradhan
1e656c2eed qcacmn: Fix channel mismatch issue
Number of reg rules in APL16 regdomain was 3. Therefore,
supported channels shows from 36 through 116.
Updated number of reg rules to 5 to enable the channels
from 36 through 165.

Change-Id: I1d7d95629e19facf7751ccae6f60aeef6eda1ba3
CRs-Fixed: 2075975
2017-07-15 14:36:27 -07:00
Abhijit Pradhan
59626eba4b qcacmn: Set country code for full-offload using iwpriv command
For full-offload, send user country code to FW using WMI
command.

Change-Id: I84acbd7ce30aa9a8ce590c8fadea2cb5914240fe
CRs-Fixed: 2053849
2017-07-13 22:02:53 -07:00
Abhijit Pradhan
f4dc3785e9 qcacmn: Regulatory Updates
Regulatory spec changes(Regdomain_23).
Removed below country codes from the regulatory database.
* IRAN
* KOREA NORTH
* SYRIA

Change-Id: Ieedfe73d0b6c2192027038f63f6ca4369666cf2a
CRs-Fixed: 2074470
2017-07-13 22:02:51 -07:00
Abhijit Pradhan
ca7d77b408 qcacmn: Fill per psoc regulatory info
Move per psoc regulatory info from pdev level function to psoc
level function.

Change-Id: Id06c6fee110ce929925f568db3a3b507214294d5
CRs-Fixed: 2066122
2017-07-12 12:08:42 +05:30
Abhijit Pradhan
cc5597b3d2 qcacmn: Add "reg_" prefix to regulatory static functions
Add "reg_" prefix to regulatory static functions.

Change-Id: Idf9beff4c2aa25c1429f52caabe4228599942d84
CRs-Fixed: 2065940
2017-07-10 09:37:01 -07:00
Amar Singhal
331a5a6e7c qcacmn: Correct CTL value for world reg-domains
Assign CTL_NONE to WORLD 2GHz/5GHz regdomain.

Change-Id: I346c136947083f5e00407a3d91651c6fd071aa1d
CRs-Fixed: 2048784
2017-07-10 09:36:59 -07:00
Amar Singhal
3162e0daad qcacmn: Modify reg-domain to pdev level
In worst case, different pdevs can be in different countries and
hence different reg-domains. Also there could be differences due
to front-haul and back-haul.

Change-Id: Ib9e998b5f7de4e42a1736d07e9e5602d8506e7b6
CRs-Fixed: 2048784
2017-07-10 09:36:58 -07:00
Kiran Kumar Lokere
4decc31941 qcacmn: Add 11d scan as wakeup event
11d scan is scheduled every one hour.The HOST can
be asleep when new country is found. So add 11d
scan as wakeup event.

Change-Id: I495c010b9c1224ab17fc0b082292befaa6b4f1e8
CRs-Fixed: 2057841
2017-07-05 11:04:58 -07:00
Vivek
b02a649f89 qcacmn: Remove vdev/peer locks for trivial APIs
Remove vdev/peer locks from trivial API's. This follows the changes from
which the lock requirement from few simple APIs are removed.

Change-Id: I9972d51dfd1a42bdedbfd0fd4e67af03d030a1f5
CRs-Fixed: 2060880
2017-06-26 23:32:22 -07:00
Vivek
5ec0bd3636 qcacmn: Remove psoc/pdev locks for trivial APIs
Remove psoc/pdev locks from trivial API's. This follows the changes from
which the lock requirement from few simple APIs are removed.

Change-Id: Ib5769c2234c8d57f485c0eef5a4e3c61fa170508
CRs-Fixed: 2060880
2017-06-26 23:32:19 -07:00
Baila, Shashikala Prabhu
dea6948639 qcacmn: Fix regulatory sanity issues
FCC11_WORLD regdomain pair added for country MALAYSIA.

Change-Id: I2def0bf412acf99d1d0181db4d8b76633aa039a1
CRs-Fixed: 2057433
2017-06-18 23:30:12 -07:00
Baila, Shashikala Prabhu
6b89e77b3f qcacmn: Regulatory database updates
Update regdomain database to "Country Table Changes Submitted 2016-10-31"
regdomain spreadsheet. It includes the following changes:

* Create new regdomain APL16_World and assign it to Argentina.
* Assign APL15_WORLD to BAHRAIN and INDIA

Change-Id: I31241847f224402bc7f125b3ed64a12ebf76242c
CRs-Fixed: 2058078
2017-06-18 23:30:11 -07:00
Amar Singhal
2e55c111a8 qcacmn: Implement 11d state machine
Regulatory component needs to listen to vdev messages in order to track
whether a master mode vdev is getting created or destroyed. It is also
used to kick-start the state machine. Also re-run the state machine when
user-space country code is set.

Change-Id: I5112396314a936f84dad2f0e07329f9cb237aa78
CRs-Fixed: 2048784
2017-06-08 13:46:53 -07:00
Kiran Kumar Lokere
82c8645b38 qcacmn: Add support for 11d FW commands and events
Add support to send 11d scan start and stop commands to FW and
process the 11d new country update event from FW.

Change-Id: I5c1588cfb5af672cdb5738784de1bd0b83bdbe77
CRs-Fixed: 2048784
2017-06-08 13:46:51 -07:00
Kiran Kumar Lokere
4c7ead0ab6 qcacmn: Restore the wlan_reg_get_current_chan_list api
Restore the wlan_reg_get_current_chan_list public service
api.

Change-Id: I3a29b4b4ce50bc2cf10484faf834cc9765eb1167
CRs-Fixed: 2048784
2017-06-08 13:46:50 -07:00
Baila, Shashikala Prabhu
bc3efea885 qcacmn: Add API to get 2GHz/5GHz freq range and wireless modes
Offload layer uses low and high 2GHz/5GHz freq ranges and chip
supported wireless modes to populate umac ic channel list.

Change-Id: I899edd83548d68e67659b3a9273ddaaaf740540b
CRs-Fixed: 2047212
2017-05-31 01:03:11 -07:00
Baila, Shashikala Prabhu
4881d6d543 qcacmn: Fix setcountry code and getcountry code failure
offload_enabled flag is set to true for full-offload.
Currently full-offload is using HOST regdb, therefore set
country code and get country is failing.

Change-Id: Idd3a7300bcc1ec1934e7258c87d5bd989ecaf5bf
CRs-Fixed: 2047212
2017-05-31 01:03:05 -07:00
Baila, Shashikala Prabhu
4140c76598 qcacmn: Fix regdb compilation error
Compiler does not allow very large local variable/array.
Error: 'the frame size of 1512 bytes is larger than 1190 bytes'

Change-Id: Ic74543c25fcb46596d49e9c0bb60f1f3c6f3f16c
CRs-Fixed: 2047212
2017-05-22 09:00:13 -07:00
Amar Singhal
90ae139bc4 qcacmn: Add callback for dynamic changes to current channel list
For dynamic master channel list, compute per pdev current channel
list as well. Provide API for user to register callback to be called
whenever current channel list for a pdev changes.

CRs-Fixed: 2012415
Change-Id: Ie86a719306178a1c3579c2b534a52a12ec3e0b1d
2017-05-18 13:42:24 -07:00
Amar Singhal
02771a0b9a qcacmn: Put structure to dynamic channel management
The current channel list maintained per pdev can be modified from
multiple entry points. Define a generic framework to compute the
new current channel list. This helps in isolating the current
channel list computation.

Change-Id: Id5eb1bb6b66ba50c90387bdc76bb95497945a5a8
CRs-Fixed: 2012415
2017-05-18 13:42:23 -07:00
Kiran Kumar Lokere
a843634983 qcacmn: Add support to send new country to FW
Add support to set new country code to the FW

Change-Id: Id24967b7c9e93bfbf045f494f142be9e33e16483
CRs-Fixed: 2042879
2017-05-18 13:42:21 -07:00
Kiran Kumar Lokere
a42244ef4d qcacmn: Add support for regulatory component ucfg APIs
Add regulatory component ucfg apis to provide user configuration

Change-Id: I870563da5dea64a9dc95055710e3325c6806a60a
CRs-Fixed: 2012415
2017-05-18 13:42:20 -07:00
Baila, Shashikala Prabhu
da029934e3 qcacmn: Add API to get country ISO from regdb
API is added to get country ISO from regdb component.

Change-Id: I3fdafeeabed2de80d950d8b32cf9b991ddef6e98
CRs-Fixed: 2047212
2017-05-16 07:26:52 -07:00
Baila, Shashikala Prabhu
a5855993db qcacmn: Regdb: Add APL13_WORLD regdomain pair to regdb
Country ALGERIA uses APL13_WORLD regdomain pair.
Add 40MHz support to 5GHz and 2GHz for EGYPT.
Add 20MHz support to 5GHZ for KOREA_NORTH.

Change-Id: Ibb063aefa06e905eb57ad61d7e2d53db1a7d33a5
CRs-Fixed: 2047212
2017-05-16 07:26:51 -07:00
Ashok Ponnaiah
922d5a4dbf qcacmn: Add NULL check for regulatory tx ops
Add NULL check for regulatory tx ops

Change-Id: Ib2cc4c795948111c9405ae14de66ad1ab5ccbdd8
2017-05-08 14:58:58 -07:00