qcacld-3.0: Fix DFS channel flag check when prevent/allow suspend

wlan_reg_get_channel_state does not return CHANNEL_STATE_DFS for DFS
channel if this channel is in NOL. Use wlan_reg_chan_has_dfs_attribute
to fix this issue.
With above fix, new issue is exposed. hdd_ctx->sap_dfs_ref_cnt is used
as a flag, If hdd_hostapd_channel_allow_suspend is called after
hdd_hostapd_channel_prevent_suspend, whatever the new channel state is,
if the old channel is going to release dfs lock, then dfs lock is
released. Generally we should handle the old channel then handle the
new channel, so exchange the order of hdd_hostapd_channel_prevent_suspend
and hdd_hostapd_channel_allow_suspend when doing channel switch.

Change-Id: I9bbeeb5ac23f3c2eaf694f64e0fea433dcc34740
CRs-Fixed: 2543642
1 file changed