Commit Graph

10 Commits

Author SHA1 Message Date
Jithender Miryala
3a915602b8 qcacmn: Process the negative AFC standard EIRP power values
When we receive a negative EIRP value from AFC APP with UINT, we treat it
as a positive value. See the following reasons why EIRP power value
was changed when we received it as a UINT.

1. In the reg_find_eirp_in_afc_eirp_obj function, the afc 'eirp_power'
(16-bit) value is in units of 0.01, and it is an unsigned integer. For
example, if the negative value is "-1400" then it becomes "64136". With
this value, when we try to get the original EIRP value using division
(eirp_obj->eirp_power / EIRP_PWR_SCALE(100)), it returns "641", but the
expected EIRP value is -14.

2. In the reg_get_sp_eirp function, both the variables 'afc_eirp_pwr'
(8-bit) and 'reg_sp_eirp_pwr'(16-bit) are declared as unsigned integers.
For example, when "-14," is assigned to "afc_eirp_pwr", it becomes "242".
And assuming 'reg_sp_eirp_pwr' is "36", the minimum of the two variables,
using QDF_MIN(afc_eirp_pwr, reg_sp_eirp_pwr), becomes "36", but the
expected minimum is "-14 or 242".

Process the positive or negative EIRP values that are received from AFC
application. Receive it as an int instead of an unint and typecast it to
int when we check for minimum value from afc power and standard power.

Change-Id: I255225e1f68ab897d36f3d4fbd5e5815a862460b
CRs-Fixed: 3398501
2023-04-19 10:36:58 -07:00
Rakesh Boyina
2567b43224 qcacmn: Add enum to map AFC response format.
Add enum to parse and store AFC response format type. This enum is
used to map the response format negotiated with FW during WMI init.

Change-Id: I5c0b61aeddfce1d1b64f9225f64546f80d0e9e3e
CRs-Fixed: 3420549
2023-04-18 12:09:30 -07:00
Vignesh U
5dc7fe9a25 qcacmn: Unpack AFC structures
During initial AFC development it was assumed that AFC object would travel
till an application endpoint outside the driver, presumably till an
application of a different machine anything in the internet and therefore,
a packed and well formatted structure was propped for the AFC object.
However, when the AFC object leaves the driver, it is converted to an
object that has NL80211 TLVs to represent it. Therefore, the packed
AFC-request object is no longer a necessity. Moreover, since an unpacked
structure (or structures) is speed/time optimized, modify the packed
structures into unpacked structures.

Change-Id: I08db1911a355b6eebffa0e13def547c98ddf38d3
CRs-Fixed: 3431997
2023-04-03 01:36:23 -07:00
Jeff Johnson
56519552e2 qcacmn: Fix umac/cmn_services/regulatory documentation
The kernel-doc script has identified documentation issues in the
umac/cmn_services/regulatory folder, so fix them.

Change-Id: I134c0692507f58e2c9b13d71bec74d57a566a91c
CRs-Fixed: 3390471
2023-01-31 19:43:39 -08:00
Amith Ajith
19f0a435c6 qcacmn: Add AFC location structure to AFC start request
Create data structure to store the deployment type(location) of AP for
AFC. Append this structure to the end of AFC start request.

Change-Id: I19756fd3ca7a77f11b673d2bf3b0382f29732847
CRs-Fixed: 3177624
2022-05-09 22:18:45 -07:00
Amith Ajith
ecd51a1f66 qcacmn: Add AFC Deployment type enum and deployment type to pdev_priv_obj
Declare the AFC deployment type enum and add deployment type member to
pdev_priv_obj.

Change-Id: Id11a0aac4fcc1b655436d9dbd876607178f27bd4
CRs-Fixed: 3186216
2022-05-09 20:45:31 -07:00
Rhythm Patwa
07fc0519ee qcacmn: Add support for AFC response structures
Add AFC response structures to send over AFC response
data over to target.

Change-Id: I80530b56b94acc43b35b414c10d6783cd8dcdd92
2021-08-19 15:22:02 -07:00
Abhijit Pradhan
235cac91ea qcacmn: Add ifdef around the body of the header file
Add #ifdef around the body of the header file so that multiple
inclusions from the same translation unit does not fail compilation.

Change the type of the frequency variables (lowfreq, highfreq) from
signed to unsigned.

Changed the positions of the 16-bit variables (version_minor,
version_major) to avoid alignment error (8 Byte alignement).

Change-Id: I72b8f7acbf21a249e2380301b41739cbe06345d6
CRs-Fixed: 2988464
2021-07-17 01:46:34 -07:00
Rhythm Patwa
5e3dce2207 qcacmn: Add version info to the AFC request structure for compatibility
Add version information to the AFC structure for compatibility issues.

Change-Id: I9f5d1da143f3e543b54b641ab8b82f722e1b5b32
2021-06-27 23:29:26 -07:00
Rhythm Patwa
aa346e9d93 qcacmn: Define new structure for AFC request parameters
Add structures for AFC request and response.

Change-Id: Ibf715d63a108b2317648dc78e4c1d12e48d755a8
2021-06-27 23:28:31 -07:00