qcacmn: Remove legacy dependency from Policy Manager Part 6

Remove legacy dependency from Policy Manager component Part 6

Change-Id: I5136d82c2b30ba71df8c48165c4bc4b560aaee39
CRs-Fixed: 2019994
This commit is contained in:
Archana Ramachandran 2017-03-14 15:12:09 -07:00
commit 544ce17b54
4 changed files with 253 additions and 33 deletions

View file

@ -39,6 +39,33 @@
#include "qdf_status.h"
#include "wlan_objmgr_psoc_obj.h"
#include "wlan_policy_mgr_public_struct.h"
#include <cds_reg_service.h>
enum cds_band_type {
CDS_BAND_ALL = 0,
CDS_BAND_2GHZ = 1,
CDS_BAND_5GHZ = 2
};
extern uint32_t cds_chan_to_freq(uint8_t chan);
extern uint8_t cds_freq_to_chan(uint32_t freq);
extern enum cds_band_type cds_chan_to_band(uint32_t chan);
#define WLAN_REG_IS_24GHZ_CH(ch) CDS_IS_CHANNEL_24GHZ(ch)
#define WLAN_REG_IS_5GHZ_CH(ch) CDS_IS_CHANNEL_5GHZ(ch)
#define WLAN_REG_IS_SAME_BAND_CHANNELS(ch1, ch2) \
CDS_IS_SAME_BAND_CHANNELS(ch1, ch2)
#define WLAN_REG_IS_CHANNEL_VALID_5G_SBS(curchan, newchan) \
CDS_IS_CHANNEL_VALID_5G_SBS(curchan, newchan)
#define wlan_reg_is_dfs_ch(psoc, ch) CDS_IS_DFS_CH(ch)
#define WLAN_REG_MAX_24GHZ_CH_NUM CDS_MAX_24GHZ_CHANNEL_NUMBER
#define reg_chan_to_freq(chan_num) cds_chan_to_freq(chan_num)
#define reg_freq_to_chan(freq) cds_freq_to_chan(freq)
#define reg_chan_to_band(chan_num) cds_chan_to_band(chan_num)
#define BAND_2G CDS_BAND_2GHZ
#define BAND_5G CDS_BAND_5GHZ
#define BAND_ALL CDS_BAND_ALL
#define wlan_reg_set_channel_params(channel, sec_ch, ch_params) \
cds_set_channel_params(channel, sec_ch, ch_params)
typedef const enum policy_mgr_pcl_type
pm_dbs_pcl_second_connection_table_type
@ -152,6 +179,7 @@ QDF_STATUS policy_mgr_handle_conc_multiport(
* concurrent change intf
* @psoc: PSOC object information
* @operation_channel: operation channel
* @vdev_id: vdev id of SAP
*
* Checks the concurrent change interface and restarts SAP
*
@ -159,10 +187,12 @@ QDF_STATUS policy_mgr_handle_conc_multiport(
*/
void policy_mgr_check_concurrent_intf_and_restart_sap(
struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id,
uint8_t operation_channel);
#else
static inline void policy_mgr_check_concurrent_intf_and_restart_sap(
struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id,
uint8_t operation_channel)
{
@ -733,6 +763,17 @@ typedef void (*policy_mgr_nss_update_cback)(struct wlan_objmgr_psoc *psoc,
uint8_t next_action,
enum policy_mgr_conn_update_reason reason);
/**
* struct check_cc_channel_work - Check concurrent interface
* channel to restart SAP work data
* @wlan_objmgr_psoc: PSOC object data
* @vdev_id: vdev id of sap
*/
struct check_cc_channel_work {
struct wlan_objmgr_psoc *psoc;
uint8_t vdev_id;
};
/**
* struct policy_mgr_sme_cbacks - SME Callbacks to be invoked
* from policy manager
@ -767,6 +808,23 @@ struct policy_mgr_sme_cbacks {
void *scan_result);
};
/**
* struct policy_mgr_hdd_cbacks - HDD Callbacks to be invoked
* from policy manager
* @sap_restart_chan_switch_cb: Restart SAP
* @wlan_hdd_get_channel_for_sap_restart: Get channel to restart
* SAP
*/
struct policy_mgr_hdd_cbacks {
void (*sap_restart_chan_switch_cb)(uint8_t,
uint32_t, uint32_t);
QDF_STATUS (*wlan_hdd_get_channel_for_sap_restart)(
uint8_t vdev_id, uint8_t *channel,
uint8_t *sec_ch,
struct ch_params_s *ch_params);
};
/**
* struct policy_mgr_tdls_cbacks - TDLS Callbacks to be invoked
* from policy manager
@ -1382,6 +1440,20 @@ bool policy_mgr_current_concurrency_is_mcc(struct wlan_objmgr_psoc *psoc);
QDF_STATUS policy_mgr_register_sme_cb(struct wlan_objmgr_psoc *psoc,
struct policy_mgr_sme_cbacks *sme_cbacks);
/**
* policy_mgr_register_hdd_cb() - register HDD callbacks
* @psoc: PSOC object information
* @hdd_cbacks: function pointers from HDD
*
* API, allows HDD to register callbacks to be invoked by policy
* mgr
*
* Return: SUCCESS,
* Failure (if registration fails)
*/
QDF_STATUS policy_mgr_register_hdd_cb(struct wlan_objmgr_psoc *psoc,
struct policy_mgr_hdd_cbacks *hdd_cbacks);
/**
* policy_mgr_register_tdls_cb() - register TDLS callbacks
* @psoc: PSOC object information