qcacld-3.0: Replace typedef hdd_cfg80211_state_t

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_cfg80211_state_t typedef
does not meet any of those criteria, so replace references to it with
a reference to the underlying struct.

Change-Id: Ica1783f34fb6fb3fe6a90ec9e165cea2a3b08c64
CRs-Fixed: 2119527
This commit is contained in:
Jeff Johnson 2017-09-30 18:09:16 -07:00 • committed by snandini
commit 5e4b93c82c
3 changed files with 26 additions and 17 deletions

View file

@ -635,7 +635,7 @@ enum action_frm_type {
WLAN_HDD_PROV_DIS_RESP,
};
typedef struct hdd_cfg80211_state {
struct hdd_cfg80211_state {
uint16_t current_freq;
u64 action_cookie;
uint8_t *buf;
@ -648,7 +648,7 @@ typedef struct hdd_cfg80211_state {
* received.
*/
bool is_go_neg_ack_received;
} hdd_cfg80211_state_t;
};
/**
* struct hdd_mon_set_ch_info - Holds monitor mode channel switch params
@ -1158,7 +1158,7 @@ struct hdd_adapter {
#endif /* WLAN_FEATURE_TSF_PLUS */
#endif
hdd_cfg80211_state_t cfg80211State;
struct hdd_cfg80211_state cfg80211State;
#ifdef WLAN_FEATURE_PACKET_FILTERING
struct hdd_multicast_addr_list mc_addr_list;

View file

@ -3475,7 +3475,7 @@ error_register_wext:
void hdd_cleanup_actionframe(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter)
{
hdd_cfg80211_state_t *cfgState;
struct hdd_cfg80211_state *cfgState;
cfgState = WLAN_HDD_GET_CFG_STATE_PTR(adapter);
@ -3923,7 +3923,7 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, uint8_t sessio
struct hdd_adapter *adapter = NULL;
hdd_adapter_list_node_t *pHddAdapterNode = NULL;
QDF_STATUS status = QDF_STATUS_E_FAILURE;
hdd_cfg80211_state_t *cfgState;
struct hdd_cfg80211_state *cfgState;
if (hdd_ctx->current_intf_count >= hdd_ctx->max_intf_count) {

View file

@ -174,7 +174,8 @@ QDF_STATUS wlan_hdd_remain_on_channel_callback(tHalHandle hHal, void *pCtx,
QDF_STATUS status, uint32_t scan_id)
{
struct hdd_adapter *pAdapter = (struct hdd_adapter *) pCtx;
hdd_cfg80211_state_t *cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
struct hdd_cfg80211_state *cfgState =
WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
struct hdd_remain_on_chan_ctx *pRemainChanCtx;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
enum rem_on_channel_request_type req_type;
@ -300,7 +301,8 @@ void wlan_hdd_cancel_existing_remain_on_channel(struct hdd_adapter *pAdapter)
#else
void wlan_hdd_cancel_existing_remain_on_channel(struct hdd_adapter *pAdapter)
{
hdd_cfg80211_state_t *cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
struct hdd_cfg80211_state *cfgState =
WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
struct hdd_remain_on_chan_ctx *pRemainChanCtx;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
unsigned long rc;
@ -389,7 +391,8 @@ void wlan_hdd_cancel_existing_remain_on_channel(struct hdd_adapter *pAdapter)
int wlan_hdd_check_remain_on_channel(struct hdd_adapter *pAdapter)
{
int status = 0;
hdd_cfg80211_state_t *cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
struct hdd_cfg80211_state *cfgState =
WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
if (QDF_P2P_GO_MODE != pAdapter->device_mode) {
/* Cancel Existing Remain On Channel */
@ -421,7 +424,8 @@ static void wlan_hdd_cancel_pending_roc(struct hdd_adapter *adapter)
{
struct hdd_remain_on_chan_ctx *roc_ctx;
unsigned long rc;
hdd_cfg80211_state_t *cfg_state = WLAN_HDD_GET_CFG_STATE_PTR(adapter);
struct hdd_cfg80211_state *cfg_state =
WLAN_HDD_GET_CFG_STATE_PTR(adapter);
uint32_t roc_scan_id;
hdd_debug("ROC completion is not received !!!");
@ -511,7 +515,8 @@ void wlan_hdd_cleanup_remain_on_channel_ctx(struct hdd_adapter *pAdapter)
void wlan_hdd_cleanup_remain_on_channel_ctx(struct hdd_adapter *pAdapter)
{
uint8_t retry = 0;
hdd_cfg80211_state_t *cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
struct hdd_cfg80211_state *cfgState =
WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
mutex_lock(&cfgState->remain_on_chan_ctx_lock);
while (pAdapter->is_roc_inprogress) {
@ -536,7 +541,7 @@ static void wlan_hdd_remain_on_chan_timeout(void *data)
{
struct hdd_adapter *pAdapter = (struct hdd_adapter *) data;
struct hdd_remain_on_chan_ctx *pRemainChanCtx;
hdd_cfg80211_state_t *cfgState;
struct hdd_cfg80211_state *cfgState;
struct hdd_context *hdd_ctx;
uint32_t roc_scan_id;
@ -587,7 +592,8 @@ static void wlan_hdd_remain_on_chan_timeout(void *data)
static int wlan_hdd_execute_remain_on_channel(struct hdd_adapter *pAdapter,
struct hdd_remain_on_chan_ctx *pRemainChanCtx)
{
hdd_cfg80211_state_t *cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
struct hdd_cfg80211_state *cfgState =
WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
@ -1080,7 +1086,7 @@ int wlan_hdd_cfg80211_remain_on_channel(struct wiphy *wiphy,
void hdd_remain_chan_ready_handler(struct hdd_adapter *pAdapter,
uint32_t scan_id)
{
hdd_cfg80211_state_t *cfgState = NULL;
struct hdd_cfg80211_state *cfgState = NULL;
struct hdd_remain_on_chan_ctx *pRemainChanCtx = NULL;
QDF_STATUS status;
@ -1203,7 +1209,8 @@ __wlan_hdd_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy,
{
struct net_device *dev = wdev->netdev;
struct hdd_adapter *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_cfg80211_state_t *cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
struct hdd_cfg80211_state *cfgState =
WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
struct hdd_remain_on_chan_ctx *pRemainChanCtx;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
int status;
@ -1429,7 +1436,8 @@ static int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
{
struct net_device *dev = wdev->netdev;
struct hdd_adapter *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_cfg80211_state_t *cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
struct hdd_cfg80211_state *cfgState =
WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
struct hdd_remain_on_chan_ctx *pRemainChanCtx;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
uint16_t extendedWait = 0;
@ -1935,7 +1943,8 @@ int wlan_hdd_cfg80211_mgmt_tx_cancel_wait(struct wiphy *wiphy,
void hdd_send_action_cnf(struct hdd_adapter *pAdapter, bool actionSendSuccess)
{
hdd_cfg80211_state_t *cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
struct hdd_cfg80211_state *cfgState =
WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
cfgState->actionFrmState = HDD_IDLE;
@ -2568,7 +2577,7 @@ void __hdd_indicate_mgmt_frame(struct hdd_adapter *pAdapter,
uint8_t type = 0;
uint8_t subType = 0;
enum action_frm_type actionFrmType;
hdd_cfg80211_state_t *cfgState = NULL;
struct hdd_cfg80211_state *cfgState = NULL;
QDF_STATUS status;
struct hdd_remain_on_chan_ctx *pRemainChanCtx = NULL;
struct hdd_context *hdd_ctx;