Following is the list of changes :-
1. Add an API dfs_agile_precac_cleanup to reset all dfs variables
while going from running to init state.
2. Add a parameter is_chan_found to dfs_prepare_agile_precac_chan and
make it true if a channel is available for PrCAC/RCAC.
3. Post event done to Agile SM when firmware returns ocac complete for
a particular agile channel.
4. Post event done if preCAC timer expires from driver for a particular
agile channel.
5. Remove the zero second timer mechanism of starting of Agile PreCAC,
instead regulate it completely using the Agile SM.
6. Add API dfs_is_agile_cac_enabled which checks if either PreCAC/RCAC
is enabled. Events are not posted to the Agile SM if none of these
are enabled.
7. Add API dfs_abort_agile_precac used to send abort to F/W for that
specific DFS index.
8. Add API dfs_init_agile_start_evt_handler to handle the start event in
init state of Agile SM. This checks if a channel is available for
PreCAC/RCAC.
9. In init and running state of the SM handle events for both PreCAC and
RCAC, while complete state is for RCAC alone.
10. Following is the algorithm implemented in the Agile SM :
The Agile SM is per psoc, create it when the psoc is created.
|
On receiving the VAP start resp, send a start event to the SM in
init state. In the start event handler check if a PreCAC/RCAC channel
is available and if found configure the agile channel params and send
a WMI to F/W.
|
A OCAC complete is received on completion of CAC by F/W or the host
timer might expire. In either case mark the channel as CAC done.
Check if interCAC was running and the channel is the des chan, if so
a primary channel change is automatically triggered.
|
In the event of mode switch/scan start/VAP down/primary channel change
while PreCAC is running a stop event is received. Clear all dfs
structures and go to init state.
|
On receiving a radar in the Agile channel, go to the init state and
set event as start. Radar in primary channel is taken care of by
ensuing VAP down up.
|
When no other channels are pending PreCAC, clean all dfs structures
and remain in the init state. PreCAC uses only init and running
states of the SM.
Change-Id: I231c79d381c7c3e192bea8ebff1ee6b5dc4a3cfa