mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
qcacld-3.0: Refine the congestion_cb API
Currently the congestion_cb API specifies a void pointer for the context parameter. It is fine for an API to use a void pointer for a data structure that is opaque or a binary blob, but in this case an HDD handle is always passed, so explicitly reference that type. This will allow the compiler to verify that the correct type of parameter is being passed. Change-Id: I3bfa07300fad8cd75b7b98c9b7ccdad4936bf32f CRs-Fixed: 2276476
This commit is contained in:
parent
b7fa256b6c
commit
f6182e4561
5 changed files with 20 additions and 11 deletions
|
|
@ -12492,10 +12492,10 @@ end:
|
|||
return err;
|
||||
}
|
||||
|
||||
void hdd_update_cca_info_cb(void *context, uint32_t congestion,
|
||||
void hdd_update_cca_info_cb(hdd_handle_t hdd_handle, uint32_t congestion,
|
||||
uint32_t vdev_id)
|
||||
{
|
||||
struct hdd_context *hdd_ctx = (struct hdd_context *)context;
|
||||
struct hdd_context *hdd_ctx = hdd_handle_to_context(hdd_handle);
|
||||
int status;
|
||||
struct hdd_adapter *adapter = NULL;
|
||||
struct hdd_station_ctx *hdd_sta_ctx;
|
||||
|
|
|
|||
|
|
@ -520,14 +520,14 @@ int wlan_hdd_disconnect(struct hdd_adapter *adapter, u16 reason);
|
|||
|
||||
/**
|
||||
* hdd_update_cca_info_cb() - stores congestion value in station context
|
||||
* @context : HDD context
|
||||
* @congestion : congestion
|
||||
* @vdev_id : vdev id
|
||||
* @hdd_handle: HDD handle
|
||||
* @congestion: congestion
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void hdd_update_cca_info_cb(void *context, uint32_t congestion,
|
||||
uint32_t vdev_id);
|
||||
void hdd_update_cca_info_cb(hdd_handle_t hdd_handle, uint32_t congestion,
|
||||
uint32_t vdev_id);
|
||||
|
||||
/**
|
||||
* wlan_hdd_get_adjacent_chan(): Gets next/previous channel
|
||||
|
|
|
|||
|
|
@ -1706,14 +1706,14 @@ QDF_STATUS sme_fast_reassoc(tHalHandle hal, struct csr_roam_profile *profile,
|
|||
uint8_t vdev_id, const tSirMacAddr connected_bssid);
|
||||
#endif
|
||||
/**
|
||||
* sme_congestion_register_callback(): registers congestion callback
|
||||
* sme_congestion_register_callback() - registers congestion callback
|
||||
* @hal: handler for HAL
|
||||
* @congestion_cb: congestion callback
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS sme_congestion_register_callback(tHalHandle hal,
|
||||
void (*congestion_cb)(void *, uint32_t congestion, uint32_t vdev_id));
|
||||
congestion_cb congestion_cb);
|
||||
|
||||
/**
|
||||
* sme_register_tx_queue_cb(): Register tx queue callback
|
||||
|
|
|
|||
|
|
@ -176,6 +176,15 @@ struct chip_pwr_save_fail_detected_params;
|
|||
typedef void (*pwr_save_fail_cb)(hdd_handle_t hdd_handle,
|
||||
struct chip_pwr_save_fail_detected_params *params);
|
||||
|
||||
/**
|
||||
* typedef congestion_cb - congestion callback function
|
||||
* @hdd_handle: HDD handle registered with SME
|
||||
* @congestion: Current congestion value
|
||||
* @vdev_id: ID of the vdev for which congestion is being reported
|
||||
*/
|
||||
typedef void (*congestion_cb)(hdd_handle_t hdd_handle, uint32_t congestion,
|
||||
uint32_t vdev_id);
|
||||
|
||||
typedef struct tagSmeStruct {
|
||||
eSmeState state;
|
||||
qdf_mutex_t lkSmeGlobalLock;
|
||||
|
|
@ -261,7 +270,7 @@ typedef struct tagSmeStruct {
|
|||
enum scan_reject_states *reason);
|
||||
void (*rso_cmd_status_cb)(void *hdd_context,
|
||||
struct rso_cmd_status *rso_status);
|
||||
void (*congestion_cb)(void *, uint32_t congestion, uint32_t vdev_id);
|
||||
congestion_cb congestion_cb;
|
||||
void (*stats_ext2_cb)(void *, struct sir_sme_rx_aggr_hole_ind *);
|
||||
pwr_save_fail_cb chip_power_save_fail_cb;
|
||||
void (*bt_activity_info_cb)(void *context, uint32_t bt_activity);
|
||||
|
|
|
|||
|
|
@ -15398,7 +15398,7 @@ void sme_store_pdev(tHalHandle hal, struct wlan_objmgr_pdev *pdev)
|
|||
}
|
||||
|
||||
QDF_STATUS sme_congestion_register_callback(tHalHandle hal,
|
||||
void (*congestion_cb)(void *, uint32_t congestion, uint32_t vdev_id))
|
||||
congestion_cb congestion_cb)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
tpAniSirGlobal mac = PMAC_STRUCT(hal);
|
||||
|
|
|
|||
Loading…
Reference in a new issue