qcacld-3.0: Replace hdd_context_t in wlan_hdd_power.[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_context_t typedef does not
meet any of those criteria, so replace references to it with a
reference to the underlying struct.

Change-Id: I84f5cc357c960d070eda7155bee7a6fe2373aa95
CRs-Fixed: 2100171
This commit is contained in:
Jeff Johnson 2017-08-28 11:45:41 -07:00 • committed by snandini
commit cfb65a8771
2 changed files with 30 additions and 30 deletions

View file

@ -292,7 +292,7 @@ int wlan_hdd_ipv4_changed(struct notifier_block *nb,
int wlan_hdd_ipv6_changed(struct notifier_block *nb,
unsigned long data, void *arg);
int hdd_set_qpower_config(hdd_context_t *hddctx, hdd_adapter_t *adapter,
int hdd_set_qpower_config(struct hdd_context *hddctx, hdd_adapter_t *adapter,
uint8_t qpower);
#ifdef FEATURE_WLAN_DIAG_SUPPORT
@ -325,7 +325,7 @@ int wlan_hdd_set_powersave(hdd_adapter_t *adapter,
*
* Return: none
*/
void wlan_hdd_inc_suspend_stats(hdd_context_t *hdd_ctx,
void wlan_hdd_inc_suspend_stats(struct hdd_context *hdd_ctx,
enum suspend_fail_reason reason);
/*

View file

@ -203,7 +203,7 @@ static int __wlan_hdd_ipv6_changed(struct notifier_block *nb,
struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)arg;
struct net_device *ndev = ifa->idev->dev;
hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(ndev);
hdd_context_t *hdd_ctx;
struct hdd_context *hdd_ctx;
int errno;
ENTER_DEV(ndev);
@ -364,7 +364,7 @@ void hdd_enable_ns_offload(hdd_adapter_t *adapter,
{
struct inet6_dev *in6_dev;
QDF_STATUS status;
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
struct wlan_objmgr_psoc *psoc = hdd_ctx->hdd_psoc;
struct pmo_ns_req *ns_req = NULL;
int err;
@ -467,7 +467,7 @@ out:
*/
static void __hdd_ipv6_notifier_work_queue(struct work_struct *work)
{
hdd_context_t *hdd_ctx;
struct hdd_context *hdd_ctx;
hdd_adapter_t *adapter;
int errno;
@ -661,7 +661,7 @@ static int hdd_set_grat_arp_keepalive(hdd_adapter_t *adapter)
{
QDF_STATUS status;
int exit_code;
hdd_context_t *hdd_ctx;
struct hdd_context *hdd_ctx;
hdd_station_ctx_t *sta_ctx;
tSirKeepAliveReq req = {
.packetType = SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP,
@ -725,7 +725,7 @@ static int hdd_set_grat_arp_keepalive(hdd_adapter_t *adapter)
*/
static void __hdd_ipv4_notifier_work_queue(struct work_struct *work)
{
hdd_context_t *hdd_ctx;
struct hdd_context *hdd_ctx;
hdd_adapter_t *adapter;
int errno;
@ -782,7 +782,7 @@ static int __wlan_hdd_ipv4_changed(struct notifier_block *nb,
struct in_ifaddr *ifa = (struct in_ifaddr *)arg;
struct net_device *ndev = ifa->ifa_dev->dev;
hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(ndev);
hdd_context_t *hdd_ctx;
struct hdd_context *hdd_ctx;
int errno;
ENTER_DEV(ndev);
@ -885,7 +885,7 @@ static struct in_ifaddr *hdd_get_ipv4_local_interface(
void hdd_enable_arp_offload(hdd_adapter_t *adapter,
enum pmo_offload_trigger trigger)
{
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
struct wlan_objmgr_psoc *psoc = hdd_ctx->hdd_psoc;
QDF_STATUS status;
struct pmo_arp_req *arp_req = NULL;
@ -953,7 +953,7 @@ out:
void hdd_enable_mc_addr_filtering(hdd_adapter_t *adapter,
enum pmo_offload_trigger trigger)
{
hdd_context_t *hdd_ctx = (hdd_context_t *)adapter->pHddCtx;
struct hdd_context *hdd_ctx = (struct hdd_context *)adapter->pHddCtx;
QDF_STATUS status;
struct wlan_objmgr_psoc *psoc = hdd_ctx->hdd_psoc;
@ -973,7 +973,7 @@ out:
void hdd_disable_mc_addr_filtering(hdd_adapter_t *adapter,
enum pmo_offload_trigger trigger)
{
hdd_context_t *hdd_ctx = (hdd_context_t *)adapter->pHddCtx;
struct hdd_context *hdd_ctx = (struct hdd_context *)adapter->pHddCtx;
QDF_STATUS status = QDF_STATUS_SUCCESS;
struct wlan_objmgr_psoc *psoc = hdd_ctx->hdd_psoc;
@ -1010,7 +1010,7 @@ int hdd_cache_mc_addr_list(struct pmo_mc_addr_list_params *mc_list_config)
void hdd_disable_and_flush_mc_addr_list(hdd_adapter_t *adapter,
enum pmo_offload_trigger trigger)
{
hdd_context_t *hdd_ctx = (hdd_context_t *)adapter->pHddCtx;
struct hdd_context *hdd_ctx = (struct hdd_context *)adapter->pHddCtx;
struct wlan_objmgr_psoc *psoc = hdd_ctx->hdd_psoc;
QDF_STATUS status = QDF_STATUS_SUCCESS;
@ -1064,7 +1064,7 @@ hdd_update_conn_state_mask(hdd_adapter_t *adapter, uint32_t *conn_state_mask)
static int
hdd_suspend_wlan(void)
{
hdd_context_t *pHddCtx;
struct hdd_context *pHddCtx;
QDF_STATUS status;
hdd_adapter_t *pAdapter = NULL;
@ -1124,7 +1124,7 @@ next_adapter:
*/
static int hdd_resume_wlan(void)
{
hdd_context_t *pHddCtx;
struct hdd_context *pHddCtx;
hdd_adapter_t *pAdapter = NULL;
hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
QDF_STATUS status;
@ -1186,7 +1186,7 @@ next_adapter:
*/
void hdd_svc_fw_shutdown_ind(struct device *dev)
{
hdd_context_t *hdd_ctx;
struct hdd_context *hdd_ctx;
v_CONTEXT_t g_context;
g_context = cds_get_global_context();
@ -1207,7 +1207,7 @@ void hdd_svc_fw_shutdown_ind(struct device *dev)
*
* Return: nothing
*/
static void hdd_ssr_restart_sap(hdd_context_t *hdd_ctx)
static void hdd_ssr_restart_sap(struct hdd_context *hdd_ctx)
{
QDF_STATUS status;
hdd_adapter_list_node_t *adapter_node = NULL, *next = NULL;
@ -1242,7 +1242,7 @@ static void hdd_ssr_restart_sap(hdd_context_t *hdd_ctx)
QDF_STATUS hdd_wlan_shutdown(void)
{
v_CONTEXT_t p_cds_context = NULL;
hdd_context_t *pHddCtx;
struct hdd_context *pHddCtx;
p_cds_sched_context cds_sched_context = NULL;
QDF_STATUS qdf_status;
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
@ -1347,7 +1347,7 @@ QDF_STATUS hdd_wlan_re_init(void)
{
v_CONTEXT_t p_cds_context = NULL;
hdd_context_t *pHddCtx = NULL;
struct hdd_context *pHddCtx = NULL;
hdd_adapter_t *pAdapter;
int ret;
bool bug_on_reinit_failure = CFG_BUG_ON_REINIT_FAILURE_DEFAULT;
@ -1451,7 +1451,7 @@ int wlan_hdd_set_powersave(hdd_adapter_t *adapter,
bool allow_power_save, uint32_t timeout)
{
tHalHandle hal;
hdd_context_t *hdd_ctx;
struct hdd_context *hdd_ctx;
if (NULL == adapter) {
hdd_err("Adapter NULL");
@ -1519,7 +1519,7 @@ int wlan_hdd_set_powersave(hdd_adapter_t *adapter,
return 0;
}
static void wlan_hdd_print_suspend_fail_stats(hdd_context_t *hdd_ctx)
static void wlan_hdd_print_suspend_fail_stats(struct hdd_context *hdd_ctx)
{
struct suspend_resume_stats *stats = &hdd_ctx->suspend_resume_stats;
@ -1531,7 +1531,7 @@ static void wlan_hdd_print_suspend_fail_stats(hdd_context_t *hdd_ctx)
stats->suspend_fail[SUSPEND_FAIL_INITIAL_WAKEUP]);
}
void wlan_hdd_inc_suspend_stats(hdd_context_t *hdd_ctx,
void wlan_hdd_inc_suspend_stats(struct hdd_context *hdd_ctx,
enum suspend_fail_reason reason)
{
wlan_hdd_print_suspend_fail_stats(hdd_ctx);
@ -1564,7 +1564,7 @@ hdd_sched_scan_results(struct wiphy *wiphy, uint64_t reqid)
*/
static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
{
hdd_context_t *pHddCtx = wiphy_priv(wiphy);
struct hdd_context *pHddCtx = wiphy_priv(wiphy);
hdd_adapter_t *pAdapter;
hdd_adapter_list_node_t *pAdapterNode, *pNext;
QDF_STATUS status = QDF_STATUS_SUCCESS;
@ -1694,7 +1694,7 @@ int wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
static void hdd_suspend_cb(void)
{
hdd_context_t *hdd_ctx;
struct hdd_context *hdd_ctx;
hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
if (!hdd_ctx) {
@ -1720,7 +1720,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
#ifdef QCA_CONFIG_SMP
#define RX_TLSHIM_SUSPEND_TIMEOUT 200 /* msecs */
#endif
hdd_context_t *pHddCtx = wiphy_priv(wiphy);
struct hdd_context *pHddCtx = wiphy_priv(wiphy);
p_cds_sched_context cds_sched_context = get_cds_sched_ctxt();
hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
hdd_adapter_t *pAdapter;
@ -1925,7 +1925,7 @@ int wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
*/
static void hdd_stop_dhcp_ind(hdd_adapter_t *adapter)
{
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
hdd_debug("DHCP stop indicated through power save");
sme_dhcp_stop_ind(hdd_ctx->hHal, adapter->device_mode,
@ -1946,7 +1946,7 @@ static void hdd_stop_dhcp_ind(hdd_adapter_t *adapter)
*/
static void hdd_start_dhcp_ind(hdd_adapter_t *adapter)
{
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
hdd_debug("DHCP start indicated through power save");
qdf_runtime_pm_prevent_suspend(&adapter->connect_rpm_ctx.connect);
@ -1972,7 +1972,7 @@ static int __wlan_hdd_cfg80211_set_power_mgmt(struct wiphy *wiphy,
int timeout)
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_context_t *pHddCtx;
struct hdd_context *pHddCtx;
int status;
ENTER();
@ -2058,7 +2058,7 @@ static int __wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
enum nl80211_tx_power_setting type,
int dbm)
{
hdd_context_t *pHddCtx = (hdd_context_t *) wiphy_priv(wiphy);
struct hdd_context *pHddCtx = (struct hdd_context *) wiphy_priv(wiphy);
tHalHandle hHal = NULL;
struct qdf_mac_addr bssid = QDF_MAC_ADDR_BROADCAST_INITIALIZER;
struct qdf_mac_addr selfMac = QDF_MAC_ADDR_BROADCAST_INITIALIZER;
@ -2153,7 +2153,7 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
int *dbm)
{
hdd_context_t *pHddCtx = (hdd_context_t *) wiphy_priv(wiphy);
struct hdd_context *pHddCtx = (struct hdd_context *) wiphy_priv(wiphy);
struct net_device *ndev = wdev->netdev;
hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(ndev);
int status;
@ -2237,7 +2237,7 @@ int wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
*
* Return: 0 on success; Errno on failure
*/
int hdd_set_qpower_config(hdd_context_t *hddctx, hdd_adapter_t *adapter,
int hdd_set_qpower_config(struct hdd_context *hddctx, hdd_adapter_t *adapter,
u8 qpower)
{
QDF_STATUS status;