Recently all instances of tHalHandle were replaced with mac_handle_t
to align with current usage and the Linux coding standard. To align
with the new naming now replace all instances of hal with mac_handle
in sap_module.
Change-Id: I8631e7b3cc4bdca564846bb2dee50e6c993087ef
CRs-Fixed: 2351898
Recently all instances of tHalHandle were replaced with mac_handle_t
to align with current usage and the Linux coding standard. To align
with the new naming now replace all instances of hal with mac_handle
in sap_fsm.
Change-Id: I560f99110bd38815c6e515006245f538d3dc6482
CRs-Fixed: 2351897
Recently all instances of tHalHandle were replaced with mac_handle_t
to align with current usage and the Linux coding standard. To align
with the new naming now replace all instances of halHandle with
mac_handle in sap_ch_select.
Change-Id: I4306005fb2677b1892272e2176e8cc73cb927d29
CRs-Fixed: 2351894
If the STA is already present, and a SAP has to come up,
return the STA channel as the best channel, and skip ACS,
if the Hw_mode is set according to the STA channel
Eg:- STA on channel 1, and hw_mode is 11B, or 11G.
Also the driver doesnt check the DFS master mode, and
includes the DFS channels in the ACS scan list, which
may result in SAP bringup on a DFS channel
Check the conc_channel, and acs_policy ini, and return the
best channel as the STA channel.
Also exclude the DFS channels from the ACS scan list if
DFS master mode is disabled.
Change-Id: I70951d7b51b620db8cda7ed771d5c36a7571a125
CRs-Fixed: 2340965
Recently all instances of tHalHandle were replaced with mac_handle_t
to align with current usage and the Linux coding standard. To align
with the new naming now replace all instances of hHal with mac_handle
in sap_module.
Change-Id: I5422b4a7e1a464a8f870cea33069c47401c73bac
CRs-Fixed: 2349566
Recently all instances of tHalHandle were replaced with mac_handle_t
to align with current usage and the Linux coding standard. To align
with the new naming now replace all instances of hHal with mac_handle
in sap_api_link_cntl.
Change-Id: I1248b01c4da617c307bc7262e32c32e069491d1c
CRs-Fixed: 2349565
Recently all instances of tHalHandle were replaced with mac_handle_t
to align with current usage and the Linux coding standard. To align
with the new naming now replace all instances of hHal with mac_handle
in sap_fsm.
Change-Id: I478b21a0e060b86c05025f3f8b1d46e196d7e93f
CRs-Fixed: 2349564
I9d0d7d109621237f29d66f7b06c5b63c38f63fb2 (qcacld-3.0: Introduce
mac_handle_t) introduced a "better" name for tHalHandle, so replace
tHalHandle with mac_handle_t in sap_fsm.
Change-Id: Ia61860e788b51c7becc6fc708a41f78e4658565d
CRs-Fixed: 2348557
I9d0d7d109621237f29d66f7b06c5b63c38f63fb2 (qcacld-3.0: Introduce
mac_handle_t) introduced a "better" name for tHalHandle, so replace
tHalHandle with mac_handle_t in sap_ch_select.
Change-Id: I204e955c7cda75bbed27a8653fbca4cca4f4b055
CRs-Fixed: 2348556
I9d0d7d109621237f29d66f7b06c5b63c38f63fb2 (qcacld-3.0: Introduce
mac_handle_t) introduced a "better" name for tHalHandle, so replace
tHalHandle with mac_handle_t in sap_api_link_cntl.
Change-Id: I2d54133a841112486ecfd7a7971a1fcefa471cfc
CRs-Fixed: 2348553
I9d0d7d109621237f29d66f7b06c5b63c38f63fb2 (qcacld-3.0: Introduce
mac_handle_t) introduced a "better" name for tHalHandle, so replace
tHalHandle with mac_handle_t in sap_module.
Change-Id: Ib3dbaf58c4dd4408a09a099b233f94331f46075f
CRs-Fixed: 2348555
Change "qcacld-3.0: Introduce mac_handle_t" introduced a modern
name for what was previously called the tHalHandle. Transition
sap_validate_chan() to use the new naming.
Change-Id: I5495d00a0fa2d1bef8d491788559fc9493797dd6
CRs-Fixed: 2347657
Function wlan_sap_set_pre_cac_status() currently takes as one
parameter a tHalHandle handle. This handle is converted into a MAC
context pointer. That MAC context pointer is then tested for NULL but
is otherwise unused. Since the MAC context, and hence the handle, are
unnecessary, remove them.
This is part of an ongoing campaign to remove or replace all instances
of tHalHandle.
Change-Id: I1c280be8c7c65a28267a9ab38d76fb8aa94e48af
CRs-Fixed: 2347653
Change "qcacld-3.0: Introduce sap_get_mac_context()" introduced a new
API for retrieving the MAC context. Since all instances of using
CDS_GET_HAL_CB have been converted, remove the macro.
Change-Id: Ib0ed67cf6af779d2805c3f7bb0cf3667c5d844f9
CRs-Fixed: 2346185
Change "qcacld-3.0: Introduce sap_get_mac_context()" introduced a new
API for retrieving the MAC context. Update sap_module to use this API.
Change-Id: I906a57557d38b139728c7f2332e9580abf947d47
CRs-Fixed: 2346184
Change "qcacld-3.0: Introduce sap_get_mac_context()" introduced a new
API for retrieving the MAC context. Update sap_fsm to use this API.
Change-Id: Id4f81e12d2544e1de5d35b0360b6a7dd0e3b3c0b
CRs-Fixed: 2346183
Change "qcacld-3.0: Introduce sap_get_mac_context()" introduced a new
API for retrieving the MAC context. Update sap_api_link_cntl to use
this API.
Change-Id: Icb5cfb0db4acaf7ee58e9527feded83c88bcb8d3
CRs-Fixed: 2346182
Currently the macro CDS_GET_HAL_CB() is used throughout the SAP to
retrieve an opaque handle for the MAC context. This name is an
anachronism given that the HAL layer was moved to firmware many
generations ago. In addition, since the SAP module is internal to the
UMAC, it should normally not be dealing with the opaque handle but
should instead be dealing directly with the MAC context. Finally, per
the coding style, "inline functions are preferable to macros
resembling functions."
To address these issues introduce sap_get_mac_context(), a new inline
function, to replace the current usage of CDS_GET_HAL_CB().
Subsequent changes will actually perform the replacement.
Change-Id: I53160f7f5a315516f5348baea8cc7945483431bd
CRs-Fixed: 2346181
When override sap channel, call wlan_reg_set_channel_params
to update ch_params.
Change-Id: I4086ec8fea0d68547a1080b0ef455a0e9f64c0b7
CRs-Fixed: 2333666
During SSR the sap context is reinitialized and it request for
scan request id again deleting the older request id from scan module
this can lead to situation where the scan requestor list is filled by
SAP request id's and thus next request for request id will return 0.
Now during de init when it try to delete the requestor id 0 it delete
the 0th entry which is for CFG. Now if again SAP register the request
id it will get the 0th index which was freed and thus when CFG
requests a scan the sap callback is called instead of CFG leading to
NULL pointer access.
Fix this by not registering for request id again after SSR for SAP.
Change-Id: Ibc8ad0700b602a9c3d2769d979303499df8d6605
CRs-Fixed: 2341133
In sap_deinit_ctx() the check to free sap_ctx->channelList is after
sap_ctx is memset to 0 and thus sap_ctx->channelList will always be
NULL and memory will never get freed.
Also there is no need to reset scan_vdev_del_in_progress after vdev
is deleted in firmware as there still can be the race when scan is
processed. scan_vdev_del_in_progress will be deleted with obj_mgr
vdev so no need to reset it.
Change-Id: Ie5f133d4db48485434436e67ce1643d8e1e04106
CRs-Fixed: 2342039
If DFS CAC is offloaded the SAP VDEV state machine does not move to
CAC wait state and thus stop AP and radar indications are dropped.
This leads to del_self_sta without del_bss.
To fix this move the SAP VDEV state machine to cac wait state when
dfs cac offload is set.
Change-Id: I0b526974a4586b41f5a4b1ea5968721f444c610b
CRs-Fixed: 2332087
noise_floor_weight is defined as unsigned in
sap_weight_channel_noise_floor(), but is checked
for value less than 0, which will never be true.
Change-Id: Idd8215c479eeae2ffd712434aae740f8465a8b45
CRs-Fixed: 2310624
Below API's logs failure with caller information,
So no need logs at caller.
qdf_mem_malloc_atomic()
qdf_mem_malloc()
wmi_buf_alloc()
qdf_nbuf_alloc()
wmi_unified_cmd_send()
Change-Id: I392fd31f2ae1e46a0d7ceaa657b77fad4efd31eb
CRs-Fixed: 2327098
Use the new API wlan_reg_chan_has_dfs_attribute
to check dfs channel or not. The old API may return
CHANNEL_STATE_DISABLE if the dfs chan is added to
NOL.
If SAP is not on dfs channel, skip the Radar event
process.
Change-Id: Ie5c87e6fa416658df64da54c276fb87f23ed7efb
CRs-Fixed: 2324649
During CAC wait if radar indication is found, SAP try to switch to
new channel. If this channel switch fails, SAP is stopped
internally.
This stopped indication is not handled if VDEV state is
START_RESTART_PROGRESS and thus vdev down is not sent to vdev FSM.
Handle SAP stop in START_RESTART_PROGRESS vdev state.
Change-Id: I92e48cc9a85249c88315fbb09fe1a61bd07983fd
CRs-Fixed: 2322996
CSA req changes the SAP FSM state to STOPPING.
Remove this state manipulation by CSA.
Change-Id: I76e78824cdc7acad87e60310d53225596630ea94
CRs-Fixed: 2309229
Logging macros already print function name by default,
there is no need to print the function name again as part of the log.
Hence, remove the function name or
wherever required use '"%s...", __func__'
Change-Id: Ib6dc6cc03ef148146b1c626271d5ac3b7345c4bb
CRs-Fixed: 2312593
Add support to store vdev object in sap context and acquire and
release its reference count during sap_set_session_param() and
sap_clear_session_param() respectively.
Change-Id: I61ab4a443ed2de5c58b62012a08c106aee7909d7
CRs-Fixed: 2312356
Divide and refactor mlme functions to integrate vdev state
machine for SAP start.
Change-Id: Id4419261cb1ba88754eded9fd780cca60f1f5db7
CRs-Fixed: 2309240
We are transitioning to new logging infrastructure
by using existing mtrace functionality.
Add new logging for complete scan request and response path.
Change-Id: Iab48b0f2a6ab9d0ec14e3110eb628b6d1731df53
CRs-Fixed: 2308237
There is race condition for a small window. The scenario
as below.
1 SAP is starting, and dfs cac begins but without finished.
2 SSR happens, wlan begins to call hdd_reset_all_adapters.
In hdd_reset_all_adapters, sap_ctx->sessionId is reset to invalid.
3 In hdd_hostapd_sap_event_cb, adapter sessionId is set to
sap_ctx->sessionId, after this step, adapter sessionId is changed
from valid sessionId to 0xff.
In hdd_reset_all_adapters->hdd_vdev_destroy, vdev is released
but session can't be clean up as invalid sessionId. adapter->event_flags
can't be clear which cause hdd_vdev_destroy can be called multi times.
Change as below.
1 cancel cac timer at the beginning of hdd_reset_all_adapters and
before wlansap_set_invalid_session.
2 before send eSAP_START_BSS_EVENT, check if sap_ctx->sessionId
is valid.
Change-Id: Ifaad62cd008f7769b059f36530455d4e734522e4
CRs-Fixed: 2293072
If STA interface is added after softap is started on DFS channel,
then SAP is stopped and re-started on non-dfs channel which is selected
using driver internal acs. But, internal acs is now obsolete. Therefore,
select non-dfs channel from preffered channel list and use SAP CSA
instead of restart.
Change-Id: I95e50c3ffbce35cf30cc9a06f0f14c9e60eb3e3f
CRs-Fixed: 2301895
Do sap_ctx release for all DFS "Ignore" case.
Otherwise, the ref count may mismatch.
Change-Id: Ib3d7c416ec3942f4d0317825fa504bc2b5abd968
CRs-Fixed: 2297787
For SAP (2.4G) + SAP (5g dfs chan), the radar event
will be posted to all vdevs. 2.4 SAP will run into
failure in random chan selection.
Fix by ignoring radar event for Non dfs channel SAP.
Change-Id: I739f2a84f17941e501dfe52c9cd12afc6a42425f
CRs-Fixed: 2294077
When channel 4 is unsafe channel in 2.4g LTE coex ACS case,
the weight for channel 4 will be calculated as 0 by function
sap_sort_chl_weight_ht40_24_g, it's wrong because weight_copy
doesn't be initialized in this case, so acs channel select
may choose wrong channel to start sap.
Fix is to add initialization for weight_copy when weight is
SAP_ACS_WEIGHT_MAX.
Change-Id: I4aa0fb133774d9980146a9ceae9b91154bd15bbc
CRs-Fixed: 2282371
Kernel checkpatch is throwing style issues due to use of camel case
notation for SAP FSM states.
To fix this, rename states according to kernel coding guidelines.
Change-Id: Ia09cccb7c51a61436d067710a763bed7f2437820
CRs-Fixed: 2295580
When STA is already up on some 2.4Ghz channel and SAP needs to be started
on some 5Ghz channel through ACS, scan channel list contains only 5Ghz
channels. But scan results contains beacons on STA 2.4Ghz channel as well
which is getting parsed contributing to bsscount and rssi on that 2.4Ghz
channel which should not be the scenario as bsscount should be 0 and rssi
should be -100 on this 2.4Ghz channel as it is not present in the scan
channel list sent by HOST to fw.
Give max weight to those channles in the sap_compute_weight
but take the effect of those channels on the channels
present in the ACS scan list.
Change-Id: I51d14aa1bb9b280c6c4d9d0085de86cc7339a4f5
CRs-Fixed: 2290744
Since, internal channel select is no longer in use and is obsolete.
Therefore, remove eSAP_CH_SELECT state from SAP state machine.
Change-Id: I7960999b983ddc1b5f6048aacbe92c500350a49b
CRs-Fixed: 2288258