qcacmn: Add DFS Radar Event Notifications
Add event notifications to userspace 1. Radar Detect 2. CAC Start 3. CAC Complete 4. NOL Start 5. NOL Complete CRs-Fixed: 2448199 Change-Id: I5deaa53c922fe4e149e7198b287e31d3876d49d4
このコミットが含まれているのは:
@@ -249,6 +249,8 @@ static os_timer_func(dfs_remove_from_nol)
|
|||||||
|
|
||||||
dfs_mlme_nol_timeout_notification(dfs->dfs_pdev_obj);
|
dfs_mlme_nol_timeout_notification(dfs->dfs_pdev_obj);
|
||||||
chan = utils_dfs_freq_to_chan(delfreq);
|
chan = utils_dfs_freq_to_chan(delfreq);
|
||||||
|
utils_dfs_deliver_event(dfs->dfs_pdev_obj, delfreq,
|
||||||
|
WLAN_EV_NOL_FINISHED);
|
||||||
dfs_debug(dfs, WLAN_DEBUG_DFS_NOL,
|
dfs_debug(dfs, WLAN_DEBUG_DFS_NOL,
|
||||||
"remove channel %d from nol", chan);
|
"remove channel %d from nol", chan);
|
||||||
utils_dfs_add_to_etsi_precac_required_list(dfs->dfs_pdev_obj,
|
utils_dfs_add_to_etsi_precac_required_list(dfs->dfs_pdev_obj,
|
||||||
|
@@ -189,6 +189,10 @@ static QDF_STATUS dfs_radar_add_channel_list_to_nol(struct wlan_dfs *dfs,
|
|||||||
(uint16_t)utils_dfs_chan_to_freq(channels[i]),
|
(uint16_t)utils_dfs_chan_to_freq(channels[i]),
|
||||||
dfs->wlan_dfs_nol_timeout);
|
dfs->wlan_dfs_nol_timeout);
|
||||||
nollist[num_ch++] = last_chan;
|
nollist[num_ch++] = last_chan;
|
||||||
|
utils_dfs_deliver_event(dfs->dfs_pdev_obj,
|
||||||
|
(uint16_t)
|
||||||
|
utils_dfs_chan_to_freq(channels[i]),
|
||||||
|
WLAN_EV_NOL_STARTED);
|
||||||
dfs_info(dfs, WLAN_DEBUG_DFS_NOL, "ch=%d Added to NOL",
|
dfs_info(dfs, WLAN_DEBUG_DFS_NOL, "ch=%d Added to NOL",
|
||||||
last_chan);
|
last_chan);
|
||||||
}
|
}
|
||||||
@@ -745,6 +749,10 @@ QDF_STATUS dfs_process_radar_ind(struct wlan_dfs *dfs,
|
|||||||
radarfound_freq, dfs->dfs_curchan->dfs_ch_ieee,
|
radarfound_freq, dfs->dfs_curchan->dfs_ch_ieee,
|
||||||
dfs->dfs_curchan->dfs_ch_freq);
|
dfs->dfs_curchan->dfs_ch_freq);
|
||||||
|
|
||||||
|
utils_dfs_deliver_event(dfs->dfs_pdev_obj,
|
||||||
|
radarfound_freq,
|
||||||
|
WLAN_EV_RADAR_DETECTED);
|
||||||
|
|
||||||
if (!dfs->dfs_use_nol) {
|
if (!dfs->dfs_use_nol) {
|
||||||
dfs_reset_bangradar(dfs);
|
dfs_reset_bangradar(dfs);
|
||||||
dfs_send_csa_to_current_chan(dfs);
|
dfs_send_csa_to_current_chan(dfs);
|
||||||
|
@@ -252,4 +252,23 @@ struct wlan_dfs_phyerr_param {
|
|||||||
bool pe_enmaxrssi;
|
bool pe_enmaxrssi;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum WLAN_DFS_EVENTS - DFS Events that will be sent to userspace
|
||||||
|
* @WLAN_EV_RADAR_DETECTED: Radar is detected
|
||||||
|
* @WLAN_EV_CAC_STARTED: CAC timer has started
|
||||||
|
* @WLAN_EV_CAC_COMPLETED: CAC timer completed
|
||||||
|
* @WLAN_EV_NOL_STARTED: NOL started
|
||||||
|
* @WLAN_EV_NOL_FINISHED: NOL Completed
|
||||||
|
*
|
||||||
|
* DFS events such as radar detected, CAC started,
|
||||||
|
* CAC completed, NOL started, NOL finished
|
||||||
|
*/
|
||||||
|
enum WLAN_DFS_EVENTS {
|
||||||
|
WLAN_EV_RADAR_DETECTED,
|
||||||
|
WLAN_EV_CAC_STARTED,
|
||||||
|
WLAN_EV_CAC_COMPLETED,
|
||||||
|
WLAN_EV_NOL_STARTED,
|
||||||
|
WLAN_EV_NOL_FINISHED,
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* _DFS_IOCTL_H_ */
|
#endif /* _DFS_IOCTL_H_ */
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include <wlan_objmgr_psoc_obj.h>
|
#include <wlan_objmgr_psoc_obj.h>
|
||||||
#include <wlan_objmgr_pdev_obj.h>
|
#include <wlan_objmgr_pdev_obj.h>
|
||||||
|
#include <wlan_dfs_ioctl.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct dfs_to_mlme - These are MLME function pointer used by DFS component.
|
* struct dfs_to_mlme - These are MLME function pointer used by DFS component.
|
||||||
@@ -62,6 +63,7 @@
|
|||||||
* list or not.
|
* list or not.
|
||||||
* @mlme_update_scan_channel_list: Update the scan channel list sent to FW.
|
* @mlme_update_scan_channel_list: Update the scan channel list sent to FW.
|
||||||
* @mlme_bringdown_vaps: Bringdown vaps if no chans is present.
|
* @mlme_bringdown_vaps: Bringdown vaps if no chans is present.
|
||||||
|
* @mlme_dfs_deliver_event: Deliver DFS events to user space
|
||||||
*/
|
*/
|
||||||
struct dfs_to_mlme {
|
struct dfs_to_mlme {
|
||||||
QDF_STATUS (*pdev_component_obj_attach)(struct wlan_objmgr_pdev *pdev,
|
QDF_STATUS (*pdev_component_obj_attach)(struct wlan_objmgr_pdev *pdev,
|
||||||
@@ -148,6 +150,10 @@ struct dfs_to_mlme {
|
|||||||
(struct wlan_objmgr_pdev *pdev);
|
(struct wlan_objmgr_pdev *pdev);
|
||||||
QDF_STATUS (*mlme_bringdown_vaps)
|
QDF_STATUS (*mlme_bringdown_vaps)
|
||||||
(struct wlan_objmgr_pdev *pdev);
|
(struct wlan_objmgr_pdev *pdev);
|
||||||
|
void (*mlme_dfs_deliver_event)
|
||||||
|
(struct wlan_objmgr_pdev *pdev,
|
||||||
|
uint16_t freq,
|
||||||
|
enum WLAN_DFS_EVENTS event);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct dfs_to_mlme global_dfs_to_mlme;
|
extern struct dfs_to_mlme global_dfs_to_mlme;
|
||||||
|
@@ -726,7 +726,7 @@ bool utils_dfs_check_for_cac_start(struct wlan_objmgr_pdev *pdev,
|
|||||||
bool utils_dfs_is_precac_done(struct wlan_objmgr_pdev *pdev,
|
bool utils_dfs_is_precac_done(struct wlan_objmgr_pdev *pdev,
|
||||||
struct wlan_channel *wlan_chan);
|
struct wlan_channel *wlan_chan);
|
||||||
/**
|
/**
|
||||||
* utils_dfs_get_disable_radar_marking - Retrieve the value of disable radar
|
* utils_dfs_get_disable_radar_marking() - Retrieve the value of disable radar.
|
||||||
* marking.
|
* marking.
|
||||||
* @pdev: Pointer to DFS pdev object.
|
* @pdev: Pointer to DFS pdev object.
|
||||||
* @dis_radar_marking: pointer to retrieve the value of disable_radar_marking.
|
* @dis_radar_marking: pointer to retrieve the value of disable_radar_marking.
|
||||||
@@ -743,6 +743,15 @@ QDF_STATUS utils_dfs_get_disable_radar_marking(struct wlan_objmgr_pdev *pdev,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* utils_dfs_deliver_event() - Deliver DFS event to userspace.
|
||||||
|
* @pdev: Pointer to DFS pdev object
|
||||||
|
* @chan: channel radar hit on
|
||||||
|
* @event: event being sent
|
||||||
|
*/
|
||||||
|
void utils_dfs_deliver_event(struct wlan_objmgr_pdev *pdev, uint16_t freq,
|
||||||
|
enum WLAN_DFS_EVENTS event);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* utils_dfs_clear_cac_started_chan() - Clear dfs cac started channel.
|
* utils_dfs_clear_cac_started_chan() - Clear dfs cac started channel.
|
||||||
* @pdev: pdev ptr
|
* @pdev: pdev ptr
|
||||||
|
@@ -110,6 +110,8 @@ void register_dfs_callbacks(void)
|
|||||||
mlme_dfs_update_scan_channel_list;
|
mlme_dfs_update_scan_channel_list;
|
||||||
tmp_dfs_to_mlme->mlme_bringdown_vaps =
|
tmp_dfs_to_mlme->mlme_bringdown_vaps =
|
||||||
mlme_dfs_bringdown_vaps;
|
mlme_dfs_bringdown_vaps;
|
||||||
|
tmp_dfs_to_mlme->mlme_dfs_deliver_event =
|
||||||
|
mlme_dfs_deliver_event;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Register precac auto channel switch feature related callbacks
|
* Register precac auto channel switch feature related callbacks
|
||||||
|
@@ -1211,3 +1211,10 @@ bool utils_is_dfs_cfreq2_ch(struct wlan_objmgr_pdev *pdev)
|
|||||||
|
|
||||||
qdf_export_symbol(utils_is_dfs_cfreq2_ch);
|
qdf_export_symbol(utils_is_dfs_cfreq2_ch);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void utils_dfs_deliver_event(struct wlan_objmgr_pdev *pdev, uint16_t freq,
|
||||||
|
enum WLAN_DFS_EVENTS event)
|
||||||
|
{
|
||||||
|
if (global_dfs_to_mlme.mlme_dfs_deliver_event)
|
||||||
|
global_dfs_to_mlme.mlme_dfs_deliver_event(pdev, freq, event);
|
||||||
|
}
|
||||||
|
新しいイシューから参照
ユーザーをブロックする