qcacld-3.0: Replace hdd_adapter_t in wlan_hdd_ipa.[ch]

The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The hdd_adapter_t typedef does not
meet any of those criteria, so replace references to it with a
reference to the underlying struct.

Change-Id: I20d1395208566001aaa3c73689e1f9e6d2b5e94f
CRs-Fixed: 2101053
This commit is contained in:
Jeff Johnson
2017-08-29 14:30:42 -07:00
committed by snandini
parent b763bb9da0
commit 49d45e6d6e
2 changed files with 34 additions and 34 deletions

View File

@@ -88,7 +88,7 @@ QDF_STATUS hdd_ipa_init(struct hdd_context *hdd_ctx);
QDF_STATUS hdd_ipa_cleanup(struct hdd_context *hdd_ctx); QDF_STATUS hdd_ipa_cleanup(struct hdd_context *hdd_ctx);
QDF_STATUS hdd_ipa_process_rxt(void *cds_context, qdf_nbuf_t rxBuf, QDF_STATUS hdd_ipa_process_rxt(void *cds_context, qdf_nbuf_t rxBuf,
uint8_t sta_id); uint8_t sta_id);
int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, int hdd_ipa_wlan_evt(struct hdd_adapter *adapter, uint8_t sta_id,
enum hdd_ipa_wlan_event type, uint8_t *mac_addr); enum hdd_ipa_wlan_event type, uint8_t *mac_addr);
int hdd_ipa_set_perf_level(struct hdd_context *hdd_ctx, uint64_t tx_packets, int hdd_ipa_set_perf_level(struct hdd_context *hdd_ctx, uint64_t tx_packets,
uint64_t rx_packets); uint64_t rx_packets);
@@ -97,10 +97,10 @@ int hdd_ipa_resume(struct hdd_context *hdd_ctx);
void hdd_ipa_uc_stat_query(struct hdd_context *hdd_ctx, uint32_t *ipa_tx_diff, void hdd_ipa_uc_stat_query(struct hdd_context *hdd_ctx, uint32_t *ipa_tx_diff,
uint32_t *ipa_rx_diff); uint32_t *ipa_rx_diff);
void hdd_ipa_uc_rt_debug_host_dump(struct hdd_context *hdd_ctx); void hdd_ipa_uc_rt_debug_host_dump(struct hdd_context *hdd_ctx);
void hdd_ipa_uc_stat_request(hdd_adapter_t *adapter, uint8_t reason); void hdd_ipa_uc_stat_request(struct hdd_adapter *adapter, uint8_t reason);
void hdd_ipa_uc_sharing_stats_request(hdd_adapter_t *adapter, void hdd_ipa_uc_sharing_stats_request(struct hdd_adapter *adapter,
uint8_t reset_stats); uint8_t reset_stats);
void hdd_ipa_uc_set_quota(hdd_adapter_t *adapter, uint8_t set_quota, void hdd_ipa_uc_set_quota(struct hdd_adapter *adapter, uint8_t set_quota,
uint64_t quota_bytes); uint64_t quota_bytes);
bool hdd_ipa_is_enabled(struct hdd_context *pHddCtx); bool hdd_ipa_is_enabled(struct hdd_context *pHddCtx);
bool hdd_ipa_uc_is_enabled(struct hdd_context *pHddCtx); bool hdd_ipa_uc_is_enabled(struct hdd_context *pHddCtx);
@@ -140,7 +140,7 @@ static inline QDF_STATUS hdd_ipa_process_rxt(void *cds_context,
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
static inline int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, static inline int hdd_ipa_wlan_evt(struct hdd_adapter *adapter, uint8_t sta_id,
enum hdd_ipa_wlan_event type, uint8_t *mac_addr) enum hdd_ipa_wlan_event type, uint8_t *mac_addr)
{ {
return 0; return 0;
@@ -177,7 +177,7 @@ static inline void hdd_ipa_uc_stat_query(struct hdd_context *hdd_ctx,
*ipa_rx_diff = 0; *ipa_rx_diff = 0;
} }
static inline void hdd_ipa_uc_stat_request(hdd_adapter_t *adapter, static inline void hdd_ipa_uc_stat_request(struct hdd_adapter *adapter,
uint8_t reason) uint8_t reason)
{ {
} }

View File

@@ -212,7 +212,7 @@ struct hdd_ipa_rx_hdr {
struct hdd_ipa_pm_tx_cb { struct hdd_ipa_pm_tx_cb {
bool exception; bool exception;
hdd_adapter_t *adapter; struct hdd_adapter *adapter;
struct hdd_ipa_iface_context *iface_context; struct hdd_ipa_iface_context *iface_context;
struct ipa_rx_data *ipa_tx_desc; struct ipa_rx_data *ipa_tx_desc;
}; };
@@ -240,7 +240,7 @@ struct hdd_ipa_priv;
struct hdd_ipa_iface_context { struct hdd_ipa_iface_context {
struct hdd_ipa_priv *hdd_ipa; struct hdd_ipa_priv *hdd_ipa;
hdd_adapter_t *adapter; struct hdd_adapter *adapter;
void *tl_context; void *tl_context;
enum ipa_client_type cons_client; enum ipa_client_type cons_client;
@@ -327,7 +327,7 @@ struct ipa_uc_fw_stats {
struct ipa_uc_pending_event { struct ipa_uc_pending_event {
qdf_list_node_t node; qdf_list_node_t node;
hdd_adapter_t *adapter; struct hdd_adapter *adapter;
enum ipa_wlan_event type; enum ipa_wlan_event type;
uint8_t sta_id; uint8_t sta_id;
uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
@@ -1319,7 +1319,7 @@ void hdd_ipa_set_tx_flow_info(void)
{ {
hdd_adapter_list_node_t *adapterNode = NULL, *pNext = NULL; hdd_adapter_list_node_t *adapterNode = NULL, *pNext = NULL;
QDF_STATUS status; QDF_STATUS status;
hdd_adapter_t *adapter; struct hdd_adapter *adapter;
struct hdd_station_ctx *pHddStaCtx; struct hdd_station_ctx *pHddStaCtx;
struct hdd_ap_ctx *hdd_ap_ctx; struct hdd_ap_ctx *hdd_ap_ctx;
hdd_hostapd_state_t *hostapd_state; hdd_hostapd_state_t *hostapd_state;
@@ -1335,9 +1335,9 @@ void hdd_ipa_set_tx_flow_info(void)
uint8_t preAdapterChannel = 0; uint8_t preAdapterChannel = 0;
uint8_t channel24; uint8_t channel24;
uint8_t channel5; uint8_t channel5;
hdd_adapter_t *preAdapterContext = NULL; struct hdd_adapter *preAdapterContext = NULL;
hdd_adapter_t *adapter2_4 = NULL; struct hdd_adapter *adapter2_4 = NULL;
hdd_adapter_t *adapter5 = NULL; struct hdd_adapter *adapter5 = NULL;
void *soc = cds_get_context(QDF_MODULE_ID_SOC); void *soc = cds_get_context(QDF_MODULE_ID_SOC);
#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */ #endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
struct wlan_objmgr_psoc *psoc; struct wlan_objmgr_psoc *psoc;
@@ -1663,7 +1663,7 @@ void hdd_ipa_uc_stat_query(struct hdd_context *hdd_ctx,
* *
* Return: None * Return: None
*/ */
static void __hdd_ipa_uc_stat_request(hdd_adapter_t *adapter, uint8_t reason) static void __hdd_ipa_uc_stat_request(struct hdd_adapter *adapter, uint8_t reason)
{ {
struct hdd_context *hdd_ctx; struct hdd_context *hdd_ctx;
struct hdd_ipa_priv *hdd_ipa; struct hdd_ipa_priv *hdd_ipa;
@@ -1704,7 +1704,7 @@ static void __hdd_ipa_uc_stat_request(hdd_adapter_t *adapter, uint8_t reason)
* *
* Return: None * Return: None
*/ */
void hdd_ipa_uc_stat_request(hdd_adapter_t *adapter, uint8_t reason) void hdd_ipa_uc_stat_request(struct hdd_adapter *adapter, uint8_t reason)
{ {
cds_ssr_protect(__func__); cds_ssr_protect(__func__);
__hdd_ipa_uc_stat_request(adapter, reason); __hdd_ipa_uc_stat_request(adapter, reason);
@@ -1719,7 +1719,7 @@ void hdd_ipa_uc_stat_request(hdd_adapter_t *adapter, uint8_t reason)
* *
* Return: None * Return: None
*/ */
void hdd_ipa_uc_sharing_stats_request(hdd_adapter_t *adapter, void hdd_ipa_uc_sharing_stats_request(struct hdd_adapter *adapter,
uint8_t reset_stats) uint8_t reset_stats)
{ {
struct hdd_context *pHddCtx; struct hdd_context *pHddCtx;
@@ -1756,7 +1756,7 @@ void hdd_ipa_uc_sharing_stats_request(hdd_adapter_t *adapter,
* *
* Return: None * Return: None
*/ */
void hdd_ipa_uc_set_quota(hdd_adapter_t *adapter, uint8_t set_quota, void hdd_ipa_uc_set_quota(struct hdd_adapter *adapter, uint8_t set_quota,
uint64_t quota_bytes) uint64_t quota_bytes)
{ {
struct hdd_context *pHddCtx; struct hdd_context *pHddCtx;
@@ -2112,7 +2112,7 @@ static QDF_STATUS hdd_ipa_uc_op_metering(struct hdd_context *hdd_ctx,
struct ipa_uc_quota_rsp *uc_quota_rsp; struct ipa_uc_quota_rsp *uc_quota_rsp;
struct ipa_uc_quota_ind *uc_quota_ind; struct ipa_uc_quota_ind *uc_quota_ind;
struct hdd_ipa_priv *hdd_ipa; struct hdd_ipa_priv *hdd_ipa;
hdd_adapter_t *adapter; struct hdd_adapter *adapter;
hdd_ipa = (struct hdd_ipa_priv *)hdd_ctx->hdd_ipa; hdd_ipa = (struct hdd_ipa_priv *)hdd_ctx->hdd_ipa;
@@ -2465,7 +2465,7 @@ static void hdd_ipa_uc_op_cb(struct op_msg_type *op_msg, void *usr_ctxt)
* *
* Return: none * Return: none
*/ */
static void hdd_ipa_uc_offload_enable_disable(hdd_adapter_t *adapter, static void hdd_ipa_uc_offload_enable_disable(struct hdd_adapter *adapter,
uint32_t offload_type, bool enable) uint32_t offload_type, bool enable)
{ {
struct hdd_ipa_priv *hdd_ipa = ghdd_ipa; struct hdd_ipa_priv *hdd_ipa = ghdd_ipa;
@@ -2630,7 +2630,7 @@ static void __hdd_ipa_wdi_meter_notifier_cb(enum ipa_wdi_meter_evt_type evt,
void *data) void *data)
{ {
struct hdd_ipa_priv *hdd_ipa = ghdd_ipa; struct hdd_ipa_priv *hdd_ipa = ghdd_ipa;
hdd_adapter_t *adapter = NULL; struct hdd_adapter *adapter = NULL;
struct ipa_get_wdi_sap_stats *wdi_sap_stats; struct ipa_get_wdi_sap_stats *wdi_sap_stats;
struct ipa_set_wifi_quota *ipa_set_quota; struct ipa_set_wifi_quota *ipa_set_quota;
int ret = 0; int ret = 0;
@@ -2945,7 +2945,7 @@ static void hdd_ipa_msg_free_fn(void *buff, uint32_t len, uint32_t type)
* *
* Return: 0 - Success * Return: 0 - Success
*/ */
static int hdd_ipa_uc_send_evt(hdd_adapter_t *adapter, static int hdd_ipa_uc_send_evt(struct hdd_adapter *adapter,
enum ipa_wlan_event type, uint8_t *mac_addr) enum ipa_wlan_event type, uint8_t *mac_addr)
{ {
struct hdd_ipa_priv *hdd_ipa = ghdd_ipa; struct hdd_ipa_priv *hdd_ipa = ghdd_ipa;
@@ -2989,7 +2989,7 @@ static int hdd_ipa_uc_send_evt(hdd_adapter_t *adapter,
* *
* Return: 0 - Success * Return: 0 - Success
*/ */
static int hdd_ipa_uc_disconnect_client(hdd_adapter_t *adapter) static int hdd_ipa_uc_disconnect_client(struct hdd_adapter *adapter)
{ {
struct hdd_ipa_priv *hdd_ipa = ghdd_ipa; struct hdd_ipa_priv *hdd_ipa = ghdd_ipa;
int ret = 0; int ret = 0;
@@ -3019,7 +3019,7 @@ static int hdd_ipa_uc_disconnect_client(hdd_adapter_t *adapter)
* Return: 0 - Success * Return: 0 - Success
*/ */
static int hdd_ipa_uc_disconnect_ap(hdd_adapter_t *adapter) static int hdd_ipa_uc_disconnect_ap(struct hdd_adapter *adapter)
{ {
int ret = 0; int ret = 0;
@@ -3038,7 +3038,7 @@ static int hdd_ipa_uc_disconnect_ap(hdd_adapter_t *adapter)
* *
* Return: 0 - Success * Return: 0 - Success
*/ */
static int hdd_ipa_uc_disconnect_sta(hdd_adapter_t *adapter) static int hdd_ipa_uc_disconnect_sta(struct hdd_adapter *adapter)
{ {
struct hdd_station_ctx *pHddStaCtx; struct hdd_station_ctx *pHddStaCtx;
struct hdd_ipa_priv *hdd_ipa = ghdd_ipa; struct hdd_ipa_priv *hdd_ipa = ghdd_ipa;
@@ -3066,7 +3066,7 @@ static int hdd_ipa_uc_disconnect(struct hdd_context *hdd_ctx)
{ {
hdd_adapter_list_node_t *adapter_node = NULL, *next = NULL; hdd_adapter_list_node_t *adapter_node = NULL, *next = NULL;
QDF_STATUS status; QDF_STATUS status;
hdd_adapter_t *adapter; struct hdd_adapter *adapter;
int ret = 0; int ret = 0;
status = hdd_get_front_adapter(hdd_ctx, &adapter_node); status = hdd_get_front_adapter(hdd_ctx, &adapter_node);
@@ -3742,7 +3742,7 @@ static int hdd_ipa_aggregated_rx_ind(qdf_nbuf_t skb)
* Return: None * Return: None
*/ */
static void hdd_ipa_send_skb_to_network(qdf_nbuf_t skb, static void hdd_ipa_send_skb_to_network(qdf_nbuf_t skb,
hdd_adapter_t *adapter) struct hdd_adapter *adapter)
{ {
int result; int result;
struct hdd_ipa_priv *hdd_ipa = ghdd_ipa; struct hdd_ipa_priv *hdd_ipa = ghdd_ipa;
@@ -3792,7 +3792,7 @@ static void hdd_ipa_send_skb_to_network(qdf_nbuf_t skb,
* Return: None * Return: None
*/ */
static void hdd_ipa_forward(struct hdd_ipa_priv *hdd_ipa, static void hdd_ipa_forward(struct hdd_ipa_priv *hdd_ipa,
hdd_adapter_t *adapter, qdf_nbuf_t skb) struct hdd_adapter *adapter, qdf_nbuf_t skb)
{ {
struct hdd_ipa_pm_tx_cb *pm_tx_cb; struct hdd_ipa_pm_tx_cb *pm_tx_cb;
@@ -3840,7 +3840,7 @@ static void hdd_ipa_forward(struct hdd_ipa_priv *hdd_ipa,
static enum hdd_ipa_forward_type hdd_ipa_intrabss_forward( static enum hdd_ipa_forward_type hdd_ipa_intrabss_forward(
struct hdd_ipa_priv *hdd_ipa, struct hdd_ipa_priv *hdd_ipa,
hdd_adapter_t *adapter, struct hdd_adapter *adapter,
uint8_t desc, uint8_t desc,
qdf_nbuf_t skb) qdf_nbuf_t skb)
{ {
@@ -3894,7 +3894,7 @@ static void __hdd_ipa_w2i_cb(void *priv, enum ipa_dp_evt_type evt,
unsigned long data) unsigned long data)
{ {
struct hdd_ipa_priv *hdd_ipa = NULL; struct hdd_ipa_priv *hdd_ipa = NULL;
hdd_adapter_t *adapter = NULL; struct hdd_adapter *adapter = NULL;
qdf_nbuf_t skb; qdf_nbuf_t skb;
uint8_t iface_id; uint8_t iface_id;
uint8_t session_id; uint8_t session_id;
@@ -4071,7 +4071,7 @@ static void hdd_ipa_send_pkt_to_tl(
struct ipa_rx_data *ipa_tx_desc) struct ipa_rx_data *ipa_tx_desc)
{ {
struct hdd_ipa_priv *hdd_ipa = iface_context->hdd_ipa; struct hdd_ipa_priv *hdd_ipa = iface_context->hdd_ipa;
hdd_adapter_t *adapter = NULL; struct hdd_adapter *adapter = NULL;
qdf_nbuf_t skb; qdf_nbuf_t skb;
struct hdd_ipa_tx_desc *tx_desc; struct hdd_ipa_tx_desc *tx_desc;
@@ -4667,7 +4667,7 @@ static void hdd_ipa_cleanup_iface(struct hdd_ipa_iface_context *iface_context)
* Return: 0 on success, negative errno value on error * Return: 0 on success, negative errno value on error
*/ */
static int hdd_ipa_setup_iface(struct hdd_ipa_priv *hdd_ipa, static int hdd_ipa_setup_iface(struct hdd_ipa_priv *hdd_ipa,
hdd_adapter_t *adapter, uint8_t sta_id) struct hdd_adapter *adapter, uint8_t sta_id)
{ {
struct hdd_ipa_iface_context *iface_context = NULL; struct hdd_ipa_iface_context *iface_context = NULL;
void *tl_context = NULL; void *tl_context = NULL;
@@ -4738,7 +4738,7 @@ static int __hdd_ipa_send_mcc_scc_msg(struct hdd_context *hdd_ctx, bool mcc_mode
{ {
hdd_adapter_list_node_t *adapter_node = NULL, *next = NULL; hdd_adapter_list_node_t *adapter_node = NULL, *next = NULL;
QDF_STATUS status; QDF_STATUS status;
hdd_adapter_t *pAdapter; struct hdd_adapter *pAdapter;
struct ipa_msg_meta meta; struct ipa_msg_meta meta;
struct ipa_wlan_msg *msg; struct ipa_wlan_msg *msg;
int ret; int ret;
@@ -4898,7 +4898,7 @@ hdd_to_ipa_wlan_event(enum hdd_ipa_wlan_event hdd_ipa_event_type)
* *
* Return: 0 on success, negative errno value on error * Return: 0 on success, negative errno value on error
*/ */
static int __hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, static int __hdd_ipa_wlan_evt(struct hdd_adapter *adapter, uint8_t sta_id,
enum ipa_wlan_event type, uint8_t *mac_addr) enum ipa_wlan_event type, uint8_t *mac_addr)
{ {
struct hdd_ipa_priv *hdd_ipa = ghdd_ipa; struct hdd_ipa_priv *hdd_ipa = ghdd_ipa;
@@ -5314,7 +5314,7 @@ end:
* *
* Return: 0 on success, negative errno value on error * Return: 0 on success, negative errno value on error
*/ */
int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, int hdd_ipa_wlan_evt(struct hdd_adapter *adapter, uint8_t sta_id,
enum hdd_ipa_wlan_event hdd_event_type, uint8_t *mac_addr) enum hdd_ipa_wlan_event hdd_event_type, uint8_t *mac_addr)
{ {
enum ipa_wlan_event type = hdd_to_ipa_wlan_event(hdd_event_type); enum ipa_wlan_event type = hdd_to_ipa_wlan_event(hdd_event_type);