diff options
Diffstat (limited to 'drivers/staging/rtl8723bs/core/rtw_mlme.c')
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_mlme.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c index 6b778206a1a3..fe739eb2cf7d 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -28,9 +28,6 @@ sint _rtw_init_mlme_priv(struct adapter *padapter) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; sint res = _SUCCESS; - /* We don't need to memset padapter->XXX to zero, because adapter is allocated by vzalloc(). */ - /* memset((u8 *)pmlmepriv, 0, sizeof(struct mlme_priv)); */ - pmlmepriv->nic_hdl = (u8 *)padapter; pmlmepriv->pscanned = NULL; @@ -119,9 +116,8 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv) void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv) { - rtw_free_mlme_priv_ie_data(pmlmepriv); - if (pmlmepriv) { + rtw_free_mlme_priv_ie_data(pmlmepriv); if (pmlmepriv->free_bss_buf) { vfree(pmlmepriv->free_bss_buf); } @@ -1818,8 +1814,10 @@ void rtw_wmm_event_callback(struct adapter *padapter, u8 *pbuf) * _rtw_join_timeout_handler - Timeout/failure handler for CMD JoinBss * @adapter: pointer to struct adapter structure */ -void _rtw_join_timeout_handler (struct adapter *adapter) +void _rtw_join_timeout_handler(struct timer_list *t) { + struct adapter *adapter = from_timer(adapter, t, + mlmepriv.assoc_timer); struct mlme_priv *pmlmepriv = &adapter->mlmepriv; DBG_871X("%s, fw_state =%x\n", __func__, get_fwstate(pmlmepriv)); @@ -1871,8 +1869,10 @@ void _rtw_join_timeout_handler (struct adapter *adapter) * rtw_scan_timeout_handler - Timeout/Failure handler for CMD SiteSurvey * @adapter: pointer to struct adapter structure */ -void rtw_scan_timeout_handler (struct adapter *adapter) +void rtw_scan_timeout_handler(struct timer_list *t) { + struct adapter *adapter = from_timer(adapter, t, + mlmepriv.scan_to_timer); struct mlme_priv *pmlmepriv = &adapter->mlmepriv; DBG_871X(FUNC_ADPT_FMT" fw_state =%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv)); @@ -1935,7 +1935,7 @@ exit: return; } -void rtw_dynamic_check_timer_handlder(struct adapter *adapter) +void rtw_dynamic_check_timer_handler(struct adapter *adapter) { if (!adapter) return; @@ -2272,13 +2272,13 @@ sint rtw_set_auth(struct adapter *adapter, struct security_priv *psecuritypriv) struct cmd_priv *pcmdpriv = &(adapter->cmdpriv); sint res = _SUCCESS; - pcmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); + pcmd = rtw_zmalloc(sizeof(struct cmd_obj)); if (pcmd == NULL) { res = _FAIL; /* try again */ goto exit; } - psetauthparm = (struct setauth_parm *)rtw_zmalloc(sizeof(struct setauth_parm)); + psetauthparm = rtw_zmalloc(sizeof(struct setauth_parm)); if (psetauthparm == NULL) { kfree((unsigned char *)pcmd); res = _FAIL; @@ -2313,7 +2313,7 @@ sint rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, s struct cmd_priv *pcmdpriv = &(adapter->cmdpriv); sint res = _SUCCESS; - psetkeyparm = (struct setkey_parm *)rtw_zmalloc(sizeof(struct setkey_parm)); + psetkeyparm = rtw_zmalloc(sizeof(struct setkey_parm)); if (psetkeyparm == NULL) { res = _FAIL; goto exit; @@ -2365,7 +2365,7 @@ sint rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, s if (enqueue) { - pcmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); + pcmd = rtw_zmalloc(sizeof(struct cmd_obj)); if (pcmd == NULL) { kfree((unsigned char *)psetkeyparm); res = _FAIL; /* try again */ |