There is a race condition while handling the below scenario, 1. NAN enable request is received from framework. 2. Policy mgr opportunistic timer expired and set hw mode initiated to Single MAC mode in scheduler thread at the same time As the opportunistic timer handler doesn't have any info if NAN enable initiated in DBS mode, it's configuring the hw mode to Single Mac Mode just before NAN enable request is sent to firmware. So the NAN enable request is sent to firmware in Single Mac Mode which is not allowed by firmware. NAN enable/disable is also similar to connection in progress status in case of STA. So provide NAN enable/disable status through hdd_is_connection_in_progress() to the opportunistic timer handler. Opportunistic timer handler restarts the timer as connection(NAN enable/disable) is in progress. Also set hw_mode_change_in_progress before checking the connection progress status. This is to avoid a possible race in the below scenario, 1. NAN-enable sets the state but scheduler thread had read the state just before that 2. NAN-enable read the hw_mode_change_in_progress just before it gets set by scheduler thread. Change-Id: I1a184c84520deb3f6ad1ec010a0fdefda96a5364 CRs-Fixed: 2566841 |
||
---|---|---|
.. | ||
inc | ||
src |