Register a callback to get max supported FW phymode for the given
channel list.
Also, corrected the array index value used to populate the DFS flag and
phymode.
Change-Id: Id635a159acac085827831726d3020cc209b810cf
CRs-Fixed: 3083405
Add support to extract the freq, cfreq1, cfreq2, PHY mode, Destination
macaddr, and channel BW values from the RTT measurement request buffer
received from the LOWI application. Pass these values to a registered
callback. Users can use these values to make some decisions on the RTT
scan.
Change-Id: Idb2232c07bbfa2946dc01e75908b9a6036597ecf
CRs-Fixed: 3060685
API "target_if_wifi_pos_oem_rsp_ev_handler" is the handler for
the event with WMI_OEM_RESPONSE_EVENTID. Host receives
"rsp->dma_len" from fw. The integer overflow occurs if
"oem_rsp->dma_len" is big enough while calculating the total
length of the Oem Data response buffer.
Fix is to add a sanity check for rsp->dma_len to avoid integer
overflow.
Change-Id: Idfbd358f62534eae0147f03505ced5728877a269
CRs-Fixed: 3001191
In wifipos component, channel info array is allocated for MAX_CHANNELS(255)
and passed to the regulatory module which uses NUM_CHANNELS to fill the
channels. NUM_CHANNELS can be more than 255. This may lead to an array out
of boundary access.
Use NUM_CHANNELS in wifipos component to allocate channel info array.
also, add a boundary check on the number of channels received from the
regulatory component.
Change-Id: I5b7a7a4767d8bbb259c5631cf744e57ee3e1effb
CRs-Fixed: 2938879
Update some logs in the wifi positioning module to be debug prints.
This helps reduce unnecessary prints in dmesg.
Change-Id: I9828fb4c2360e7d25195130da0315d605c04c14b
CRs-fixed: 2928849
In the current code, host does not send the channel list information to
WIN LOWI application. LOWI application populates the TX power in OEM RTT
request frame from the host received channel list information. Since the
channel list was not received from host TX power was set to 0. This was
leading to low RSSI for RTT ack frames.
Send the channel list information of all the PDEVs and PSOCs to WIN LOWI
application to set a valid TX power.
Change-Id: I9b7d740b37349d092629aa2f9550555901fb4331
reg_get_channel_list_with_power function is a redundant function as its
counterpart reg_get_channel_list_with_power_for freq have the same
functionality. Also the two functions have almost the same implementation.
Therefore removing the function reg_get_channel_list_with_power.
Also added the assignment of the variable "chan_num" to the function
reg_get_channel_list_with_power_for_freq, as the assignment was missing.
CRs-Fixed: 2738838
Change-Id: Ifd2fd795cacd89989e1755f3b8fd56ccd7d5b84f
Currently wifi positioning api to update channel bandwidth
info is invoking regulatory component api to set the channel
params with BW as CH_WIDTH_MAX, because of which regulatory
component is returning the maximum BW supported for the current
regdomain which is 160MHz. If target does not support 160MHz in
that case it may lead to undefined behavior.
To address this issue, pass max supported BW by target as
argument to regulatory component so that regulatory component
does not return the BW greater then the target supported BW.
CRs-Fixed: 2730665
Change-Id: I6051336ab2f3ea902a70ed80290e5a5f060de5b9
CONFIG_CHAN_NUM_API macro will be disabled. Remove all the references to
any function defined/declared under the macro. The function
reg_get_channel_list_with_power was placed under CHAN_NUM_API by mistake.
This API does not have any CHAN_FREQ_API counterpart. Therefore, move
this function out of CHAN_NUM_API macro.
The function dfs_send_radar_ind_for_freq is redundant as its counterpart
dfs_send_radar_ind has the same arguments and same functionality,
removing the function dfs_send_radar_ind_for_freq. The function
dfs_send_radar_ind is moved out of CHAN_NUM_API macro.
The function wlan_reg_chan_to_freq, wlan_reg_legacy_chan_to_freq is
moved out of CONFIG_CHAN_NUM_API macro. Since it is applicable for legacy
bands.
CRs-Fixed: 2711600
Change-Id: Ib29be638c17ce51f928c865e362ac5b2b8954b42
LOWI application provides the interface name as part of lowi message to
host driver. Add support in the driver code to get the corresponding
pdev_id and pdev from interface name using dev_get_by_name().
Change-Id: I267b95c843a9bb1dd0c58ff45767f31999500b1c
CRs-Fixed: 2711423
Update the wifi_pos_send_rsp function pointer cast to have the
same parameters as the actual function pointer.
Change-Id: I7e9f5f9972fe96f74c76ffb0fa069a93c98db72b
CRs-fixed: 2685627
Host driver processes cld80211 vendor subcmd
CLD80211_VENDOR_SUB_CMD_OEM_DATA and send
response in NLA format. Peer status indication
is also sent in nla format
CRs-Fixed: 2597282
Change-Id: I94f1fb7939141952ef92dbb7d3a130ba20d31608
Host driver processes cld80211 vendor sub command
CLD80211_VENDOR_SUB_CMD_GET_CH_INFO and respond with
NLA type CH_INFO response
CRs-Fixed: 2595374
Change-Id: Ibe6f2431ac1cae6e4560ec11424434b4f1cf8b76
Host driver processes cld80211 vendor sub command
CLD80211_VENDOR_SUB_CMD_GET_CAPS and respond with
NLA type CAP response
CRs-Fixed: 2595140
Change-Id: I5a6aa1fac537ca618404520b81c541a20dafd6fb
Currently, wifi-pos uses channel number to get the fwr phymode.
For adding 6g support wifi-pos need to get the phymode from
frequency instead of channel number
As a part of fix, Add handler for getting phymode based on
frequency
CRs-Fixed: 2617903
Change-Id: I007edebe41bf5ca750a1262c85043f628dc9f89f
Host driver sends channel list and number of channels to lowi-server
in ANI_MSG_GET_OEM_CAP_RSP. 6Ghz channels in the channel list are not
useful for legacy lowi-server not supporting 6Ghz channels.
For legacy oem targets, driver sets "oem_6g_support_disable".
Change-Id: Ibc072ff2df3d7b246d3a48d7cebcb5feac35b715
CRs-Fixed: 2597645
Append 4 bytes enhancement flags in ANI_MSG_APP_REG_RSP message.
NL_ENABLE_OEM_REQ_RSP i.e. 0x00000001 in ANI_MSG_APP_REG_RSP message
represents host driver support for NLA type request and response
for oem commands.
Change-Id: I5d07d017a27b676537c24fbf15f224af8964c665
CRs-Fixed: 2591896
Currently wifi update channel bw api is using legacy api
wlan reg get chan freq to convert channel numbers to the
frequency which does not take care of the bonded channels
and returns invalid channel number error code for bonded
channels which results in undefined behavior on the user
space application which is using the result of this api.
To address above issue, use the correct api to convert
channel number to frequency.
Change-Id: I80295b0ff502747d5655642f2506283bd3ba0b52
CRs-fixed: 2547546
Dynamically allocate ch_list in wifi_pos_pdev_iterator(), to avoid
exceeding the stack frame limit with the introduction of new channels.
Change-Id: I41aaa3ad0405a3023768e5278dacf7475524c4e0
CRs-Fixed: 2463009
FTMRR and WRU frames should be sent from host and these request should
not be forwarded to FW. Add support in wifi pos to process this request
and send response to userspace.
Change-Id: I54049a1a889839e44d418ceebcca09e5092f6063
CRs-Fixed: 2500751
For multi-radio SoCs, wmi handle is maintained per pdev to map to
separate copy engine used for sending WMI commands to taget. Add support
to send wifi position related WMI to send it per pdev.
Change-Id: I300be2bbfd77cb9390fef37b5b02a002284976e0
CRs-Fixed: 2495277
In wifi_pos_parse_req(), payload sections of nl attributes ATTR_DATA and
ATTR_META_DATA are type casted to driver internal structures tAniMsgHdr
and wifi_pos_field_info respectively without validating payload lengths
which can lead to buffer overread if the payload lengths are less than
size of internal structures.
To fix this, avoid type-cast and return error if payload lengths of nl
attributes ATTR_DATA and ATTR_META_DATA are less than size of tAniMsgHdr
and wifi_pos_field_info respectively.
Change-Id: Ie9e3197f2cd3852b394e834991aa8d3a5b530d85
CRs-Fixed: 2471275
Currently when user request comes to populate oem
capabilities, driver is populating all the channels which
includes disabled channels also and the logic to populate
the channels is incorrect. This is resulting in invalid
channel configuration for user space command.
To avoid above issue, use correct api which returns only valid
channels and valid number of channels and populate the channels
correctly in the output buffer.
Change-Id: Ib239d5d869ca9d010c85f444b83751d2e121625d
CRs-fixed: 2470193
Create below regdb files in core component and move the code from
reg_services.c file.
These files has the common code used by both WIN and MCL.
reg_common_services.c: this file has regdb common APIs used by both WIN and
MCL.
reg_build_chan_list.c: this file has APIs to build master and current
channel list.
reg_priv_objs.c: this file has the APIs to create regulatory private PSOC
and pdev objects.
Change-Id: I891b14fac7a4eddf2697d2ecdc0ac4a82046f532
CRs-Fixed: 2349173
Currently, the function causes the system false when
tries to release the spinlock because it holds the
spinlock longer than max_hold_time.
Change-Id: I90c78b7d8530cf3d1c224a693ab9f743f669b730
CRs-Fixed: 2371481
Add validation code to make sure wifi_pos_send_rsp
function pointer is not null.
Change-Id: I6761f5065b1a49855afac2691523c41bcf383b2b
CRs-Fixed: 2329346
Currently PHY mode is not getting updated and it is being set as
0, which is resulting in an invalid channel setting to FW
for LOWI.
To address this issue update the PHY mode correctly.
Change-Id: I77b2a517915a05d6a13dec5cee064d83bfae2992
CRs-Fixed: 2318563
Add per module logging macros without function/line info
to avoid adding function/line info where it is not required.
Change-Id: I34ba6f6485f9b506264daf4e116052d2858bed40
CRs-Fixed: 2278876
Map all module level log APIs to per-level log APIs
to compile out specific log level if required.
Change-Id: I4072b6740cb43200fd95c40943b66e1d5f8f1847
CRs-Fixed: 2266719
Do not take a common object ref count during common object create
notification because until common object destroy notification is
not received the ref count will not be released and in this case
ref count will never be released becasue object destory notification
will never come. takign ref coutn from object create notification
will always lead to object leak.
Change-Id: Iab7da602ef2d627866c3353b978eaa63749b62dd
CRs-Fixed: 2252274
Legacy User space application for wifi pos component uses old
API signature hence using new signature breaks the legacy interfac
between user space application and host driver. Revert to old
signature to fix the interface.
Change-Id: Idc55ecba23a8ac6263dd82fa9fb3650784db67f6
CRs-Fixed: 2244016
Check return of function target_if_wifi_pos_get_txops against
NULL before using to avoid null pointer dereference.
Change-Id: Icbd58e4495a6bd31a9fe5c74eb51b67bb8157acf
CRs-Fixed: 2160763
In wifi_pos component, use regulatory APIs to get channel
information and remove UMAC_REG_COMPONENT
Change-Id: I85bb6dac2930dd702f6f9468fa5cebf920270255
CRs-Fixed: 2122877
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
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
Add handling of indirect data in WMI_OEM_RESPONSE_EVENTID.
This data then needs to be sent to userspace app.
Change-Id: Id1661f23ff000b33da9640cc44ea7be25e9f8dc0
CRs-Fixed: 2053958