diff options
Diffstat (limited to 'drivers/staging/rtl8188eu/os_dep')
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 14 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/mlme_linux.c | 19 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/os_intfs.c | 8 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/recv_linux.c | 5 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 16 |
6 files changed, 35 insertions, 29 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index 24a8f5ac96e5..96c1c2d4a112 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -32,6 +32,8 @@ #include <rtw_iol.h> #include <linux/vmalloc.h> +#include <linux/etherdevice.h> + #include "osdep_intf.h" #define RTL_IOCTL_WPA_SUPPLICANT (SIOCIWFIRSTPRIV + 30) @@ -92,7 +94,7 @@ void rtw_indicate_wx_disassoc_event(struct adapter *padapter) memset(&wrqu, 0, sizeof(union iwreq_data)); wrqu.ap_addr.sa_family = ARPHRD_ETHER; - memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); + eth_zero_addr(wrqu.ap_addr.sa_data); DBG_88E_LEVEL(_drv_always_, "indicate disassoc\n"); wireless_send_event(padapter->pnetdev, SIOCGIWAP, &wrqu, NULL); @@ -827,7 +829,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, for (j = 0; j < NUM_PMKID_CACHE; j++) { if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)) { /* BSSID is matched, the same AP => Remove this PMKID information and reset it. */ - memset(psecuritypriv->PMKIDList[j].Bssid, 0x00, ETH_ALEN); + eth_zero_addr(psecuritypriv->PMKIDList[j].Bssid); psecuritypriv->PMKIDList[j].bUsed = false; break; } @@ -1028,7 +1030,7 @@ static int rtw_wx_get_wap(struct net_device *dev, wrqu->ap_addr.sa_family = ARPHRD_ETHER; - memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN); + eth_zero_addr(wrqu->ap_addr.sa_data); RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_wap\n")); @@ -1037,7 +1039,7 @@ static int rtw_wx_get_wap(struct net_device *dev, ((check_fwstate(pmlmepriv, WIFI_AP_STATE)) == true)) memcpy(wrqu->ap_addr.sa_data, pcur_bss->MacAddress, ETH_ALEN); else - memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN); + eth_zero_addr(wrqu->ap_addr.sa_data); return 0; } @@ -1796,11 +1798,9 @@ static int rtw_wx_set_gen_ie(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - int ret; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - ret = rtw_set_wpa_ie(padapter, extra, wrqu->data.length); - return ret; + return rtw_set_wpa_ie(padapter, extra, wrqu->data.length); } static int rtw_wx_set_auth(struct net_device *dev, diff --git a/drivers/staging/rtl8188eu/os_dep/mlme_linux.c b/drivers/staging/rtl8188eu/os_dep/mlme_linux.c index 1b892c424cb8..baff1e2661d5 100644 --- a/drivers/staging/rtl8188eu/os_dep/mlme_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/mlme_linux.c @@ -29,9 +29,12 @@ void rtw_init_mlme_timer(struct adapter *padapter) { struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - _init_timer(&(pmlmepriv->assoc_timer), padapter->pnetdev, _rtw_join_timeout_handler, padapter); - _init_timer(&(pmlmepriv->scan_to_timer), padapter->pnetdev, rtw_scan_timeout_handler, padapter); - _init_timer(&(pmlmepriv->dynamic_chk_timer), padapter->pnetdev, rtw_dynamic_check_timer_handlder, padapter); + setup_timer(&pmlmepriv->assoc_timer, _rtw_join_timeout_handler, + (unsigned long)padapter); + setup_timer(&pmlmepriv->scan_to_timer, rtw_scan_timeout_handler, + (unsigned long)padapter); + setup_timer(&pmlmepriv->dynamic_chk_timer, + rtw_dynamic_check_timer_handlder, (unsigned long)padapter); } void rtw_os_indicate_connect(struct adapter *adapter) @@ -60,7 +63,6 @@ void rtw_reset_securitypriv(struct adapter *adapter) /* We have to backup the PMK information for WiFi PMK Caching test item. */ /* Backup the btkip_countermeasure information. */ /* When the countermeasure is trigger, the driver have to disconnect with AP for 60 seconds. */ - memset(&backup_pmkid[0], 0x00, sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE); memcpy(&backup_pmkid[0], &adapter->securitypriv.PMKIDList[0], sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE); backup_index = adapter->securitypriv.PMKIDIndex; backup_counter = adapter->securitypriv.btkip_countermeasure; @@ -131,15 +133,18 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie) void init_addba_retry_timer(struct adapter *padapter, struct sta_info *psta) { - _init_timer(&psta->addba_retry_timer, padapter->pnetdev, addba_timer_hdl, psta); + setup_timer(&psta->addba_retry_timer, addba_timer_hdl, + (unsigned long)psta); } void init_mlme_ext_timer(struct adapter *padapter) { struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - _init_timer(&pmlmeext->survey_timer, padapter->pnetdev, survey_timer_hdl, padapter); - _init_timer(&pmlmeext->link_timer, padapter->pnetdev, link_timer_hdl, padapter); + setup_timer(&pmlmeext->survey_timer, survey_timer_hdl, + (unsigned long)padapter); + setup_timer(&pmlmeext->link_timer, link_timer_hdl, + (unsigned long)padapter); } #ifdef CONFIG_88EU_AP_MODE diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c index 88a909c9e457..750c87b46365 100644 --- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c +++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c @@ -38,7 +38,7 @@ MODULE_VERSION(DRIVERVERSION); #define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */ /* module param defaults */ -static int rtw_chip_version = 0x00; +static int rtw_chip_version; static int rtw_rfintfs = HWPI; static int rtw_lbkmode;/* RTL8712_AIR_TRX; */ static int rtw_network_mode = Ndis802_11IBSS;/* Ndis802_11Infrastructure; infra, ad-hoc, auto */ @@ -998,7 +998,8 @@ int _netdev_open(struct net_device *pnetdev) } padapter->net_closed = false; - _set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000); + mod_timer(&padapter->mlmepriv.dynamic_chk_timer, + jiffies + msecs_to_jiffies(2000)); padapter->pwrctrlpriv.bips_processing = false; rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv); @@ -1052,7 +1053,8 @@ static int ips_netdrv_open(struct adapter *padapter) padapter->intf_start(padapter); rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv); - _set_timer(&padapter->mlmepriv.dynamic_chk_timer, 5000); + mod_timer(&padapter->mlmepriv.dynamic_chk_timer, + jiffies + msecs_to_jiffies(5000)); return _SUCCESS; diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index 05427c489b3f..05701328dce4 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -193,7 +193,8 @@ _recv_indicatepkt_drop: void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl) { - struct adapter *padapter = preorder_ctrl->padapter; - _init_timer(&(preorder_ctrl->reordering_ctrl_timer), padapter->pnetdev, rtw_reordering_ctrl_timeout_handler, preorder_ctrl); + setup_timer(&preorder_ctrl->reordering_ctrl_timer, + rtw_reordering_ctrl_timeout_handler, + (unsigned long)preorder_ctrl); } diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index bee39c2278f1..ef3c73e38172 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c @@ -179,7 +179,7 @@ static void usb_intf_stop(struct adapter *padapter) { RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+usb_intf_stop\n")); - /* disabel_hw_interrupt */ + /* disable_hw_interrupt */ if (!padapter->bSurpriseRemoved) { /* device still exists, so driver can do i/o operation */ /* TODO: */ diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index 80e7ef96d807..7e599bc5b2d3 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -530,6 +530,7 @@ void usb_read_port_cancel(struct adapter *padapter) { int i; struct recv_buf *precvbuf; + precvbuf = (struct recv_buf *)padapter->recvpriv.precv_buf; DBG_88E("%s\n", __func__); @@ -552,7 +553,6 @@ int usb_write8(struct adapter *adapter, u32 addr, u8 val) u16 index; u16 len; u8 data; - int ret; request = 0x05; requesttype = 0x00;/* write_out */ @@ -560,8 +560,8 @@ int usb_write8(struct adapter *adapter, u32 addr, u8 val) wvalue = (u16)(addr&0x0000ffff); len = 1; data = val; - ret = usbctrl_vendorreq(adapter, request, wvalue, index, &data, len, requesttype); - return ret; + return usbctrl_vendorreq(adapter, request, wvalue, + index, &data, len, requesttype); } int usb_write16(struct adapter *adapter, u32 addr, u16 val) @@ -572,7 +572,6 @@ int usb_write16(struct adapter *adapter, u32 addr, u16 val) u16 index; u16 len; __le32 data; - int ret; request = 0x05; @@ -584,10 +583,10 @@ int usb_write16(struct adapter *adapter, u32 addr, u16 val) data = cpu_to_le32(val & 0x0000ffff); - ret = usbctrl_vendorreq(adapter, request, wvalue, index, &data, len, requesttype); + return usbctrl_vendorreq(adapter, request, wvalue, + index, &data, len, requesttype); - return ret; } int usb_write32(struct adapter *adapter, u32 addr, u32 val) @@ -598,7 +597,6 @@ int usb_write32(struct adapter *adapter, u32 addr, u32 val) u16 index; u16 len; __le32 data; - int ret; request = 0x05; @@ -609,10 +607,10 @@ int usb_write32(struct adapter *adapter, u32 addr, u32 val) len = 4; data = cpu_to_le32(val); - ret = usbctrl_vendorreq(adapter, request, wvalue, index, &data, len, requesttype); + return usbctrl_vendorreq(adapter, request, wvalue, + index, &data, len, requesttype); - return ret; } static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) |