diff options
Diffstat (limited to 'drivers/staging/rtl8723bs/os_dep')
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 57 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/os_intfs.c | 19 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/osdep_service.c | 29 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 10 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c | 30 |
5 files changed, 34 insertions, 111 deletions
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c index 8fb03efd588b..e3d356952875 100644 --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c @@ -961,7 +961,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, if (pPMK->cmd == IW_PMKSA_ADD) { DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n"); if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN)) - return(intReturn); + return intReturn; else intReturn = true; @@ -2590,10 +2590,6 @@ static int rtw_wps_start(struct net_device *dev, DBG_871X("[%s] wps_start = %d\n", __func__, u32wps_start); -#ifdef CONFIG_INTEL_WIDI - process_intel_widi_wps_status(padapter, u32wps_start); -#endif /* CONFIG_INTEL_WIDI */ - exit: return ret; @@ -4518,42 +4514,6 @@ static int rtw_tdls_get(struct net_device *dev, -#ifdef CONFIG_INTEL_WIDI -static int rtw_widi_set(struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, char *extra) -{ - int ret = 0; - struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - - process_intel_widi_cmd(padapter, extra); - - return ret; -} - -static int rtw_widi_set_probe_request(struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, char *extra) -{ - int ret = 0; - u8 *pbuf = NULL; - struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - - pbuf = rtw_malloc(sizeof(l2_msg_t)); - if (pbuf) { - if (copy_from_user(pbuf, wrqu->data.pointer, wrqu->data.length)) - ret = -EFAULT; - /* memcpy(pbuf, wrqu->data.pointer, wrqu->data.length); */ - - if (wrqu->data.flags == 0) - intel_widi_wk_cmd(padapter, INTEL_WIDI_ISSUE_PROB_WK, pbuf, sizeof(l2_msg_t)); - else if (wrqu->data.flags == 1) - rtw_set_wfd_rds_sink_info(padapter, (l2_msg_t *)pbuf); - } - return ret; -} -#endif /* CONFIG_INTEL_WIDI */ - static int rtw_test( struct net_device *dev, struct iw_request_info *info, @@ -4791,17 +4751,6 @@ static const struct iw_priv_args rtw_private_args[] = { IW_PRIV_TYPE_CHAR | 40, IW_PRIV_TYPE_CHAR | 0x7FF, "test" }, -#ifdef CONFIG_INTEL_WIDI - { - SIOCIWFIRSTPRIV + 0x1E, - IW_PRIV_TYPE_CHAR | 1024, 0, "widi_set" - }, - { - SIOCIWFIRSTPRIV + 0x1F, - IW_PRIV_TYPE_CHAR | 128, 0, "widi_prob_req" - }, -#endif /* CONFIG_INTEL_WIDI */ - #ifdef CONFIG_WOWLAN { MP_WOW_ENABLE , IW_PRIV_TYPE_CHAR | 1024, 0, "wow_mode" }, /* set */ #endif @@ -4852,10 +4801,6 @@ static iw_handler rtw_private_handler[] = { rtw_mp_efuse_get, /* 0x1B */ NULL, /* 0x1C is reserved for hostapd */ rtw_test, /* 0x1D */ -#ifdef CONFIG_INTEL_WIDI - rtw_widi_set, /* 0x1E */ - rtw_widi_set_probe_request, /* 0x1F */ -#endif /* CONFIG_INTEL_WIDI */ }; static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev) diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c index 143e3f9b31aa..9021bf519605 100644 --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c @@ -309,9 +309,6 @@ static uint loadparam(struct adapter *padapter, _nic_hdl pnetdev) registry_par->hw_wps_pbc = (u8)rtw_hw_wps_pbc; registry_par->max_roaming_times = (u8)rtw_max_roaming_times; -#ifdef CONFIG_INTEL_WIDI - registry_par->max_roaming_times = (u8)rtw_max_roaming_times + 2; -#endif /* CONFIG_INTEL_WIDI */ registry_par->enable80211d = (u8)rtw_80211d; @@ -757,7 +754,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter) rtw_init_hal_com_default_value(padapter); - if ((rtw_init_cmd_priv(&padapter->cmdpriv)) == _FAIL) { + if (rtw_init_cmd_priv(&padapter->cmdpriv)) { RT_TRACE(_module_os_intfs_c_, _drv_err_, ("\n Can't init cmd_priv\n")); ret8 = _FAIL; goto exit; @@ -765,7 +762,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter) padapter->cmdpriv.padapter = padapter; - if ((rtw_init_evt_priv(&padapter->evtpriv)) == _FAIL) { + if (rtw_init_evt_priv(&padapter->evtpriv)) { RT_TRACE(_module_os_intfs_c_, _drv_err_, ("\n Can't init evt_priv\n")); ret8 = _FAIL; goto exit; @@ -816,14 +813,6 @@ u8 rtw_init_drv_sw(struct adapter *padapter) rtw_hal_dm_init(padapter); -#ifdef CONFIG_INTEL_WIDI - if (rtw_init_intel_widi(padapter) == _FAIL) { - DBG_871X("Can't rtw_init_intel_widi\n"); - ret8 = _FAIL; - goto exit; - } -#endif /* CONFIG_INTEL_WIDI */ - exit: RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-rtw_init_drv_sw\n")); @@ -860,10 +849,6 @@ u8 rtw_free_drv_sw(struct adapter *padapter) { RT_TRACE(_module_os_intfs_c_, _drv_info_, ("==>rtw_free_drv_sw")); -#ifdef CONFIG_INTEL_WIDI - rtw_free_intel_widi(padapter); -#endif /* CONFIG_INTEL_WIDI */ - free_mlme_ext_priv(&padapter->mlmeextpriv); rtw_free_cmd_priv(&padapter->cmdpriv); diff --git a/drivers/staging/rtl8723bs/os_dep/osdep_service.c b/drivers/staging/rtl8723bs/os_dep/osdep_service.c index 73b87da15eb2..a5a5a5c8226a 100644 --- a/drivers/staging/rtl8723bs/os_dep/osdep_service.c +++ b/drivers/staging/rtl8723bs/os_dep/osdep_service.c @@ -107,7 +107,7 @@ static int readFile(struct file *fp, char *buf, int len) return -EPERM; while (sum<len) { - rlen =fp->f_op->read(fp, (char __force __user *)buf+sum, len-sum, &fp->f_pos); + rlen = kernel_read(fp, buf + sum, len - sum, &fp->f_pos); if (rlen>0) sum+=rlen; else if (0 != rlen) @@ -116,7 +116,7 @@ static int readFile(struct file *fp, char *buf, int len) break; } - return sum; + return sum; } @@ -129,22 +129,16 @@ static int isFileReadable(char *path) { struct file *fp; int ret = 0; - mm_segment_t oldfs; char buf; fp =filp_open(path, O_RDONLY, 0); - if (IS_ERR(fp)) { - ret = PTR_ERR(fp); - } - else { - oldfs = get_fs(); set_fs(KERNEL_DS); + if (IS_ERR(fp)) + return PTR_ERR(fp); - if (1!=readFile(fp, &buf, 1)) - ret = -EINVAL; + if (readFile(fp, &buf, 1) != 1) + ret = -EINVAL; - set_fs(oldfs); - filp_close(fp, NULL); - } + filp_close(fp, NULL); return ret; } @@ -158,16 +152,15 @@ static int isFileReadable(char *path) static int retriveFromFile(char *path, u8 *buf, u32 sz) { int ret =-1; - mm_segment_t oldfs; struct file *fp; if (path && buf) { - if (0 == (ret =openFile(&fp, path, O_RDONLY, 0))) { + ret = openFile(&fp, path, O_RDONLY, 0); + + if (ret == 0) { DBG_871X("%s openFile path:%s fp =%p\n", __func__, path , fp); - oldfs = get_fs(); set_fs(KERNEL_DS); ret =readFile(fp, buf, sz); - set_fs(oldfs); closeFile(fp); DBG_871X("%s readFile, ret:%d\n", __func__, ret); @@ -248,7 +241,7 @@ RETURN: return pnetdev; } -void rtw_free_netdev(struct net_device * netdev) +void rtw_free_netdev(struct net_device *netdev) { struct rtw_netdev_priv_indicator *pnpi; diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c index 6d02904de63f..052482554f74 100644 --- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c +++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c @@ -74,7 +74,7 @@ static void sd_sync_int_hdl(struct sdio_func *func) static int sdio_alloc_irq(struct dvobj_priv *dvobj) { - PSDIO_DATA psdio_data; + struct sdio_data *psdio_data; struct sdio_func *func; int err; @@ -102,7 +102,7 @@ static int sdio_alloc_irq(struct dvobj_priv *dvobj) static void sdio_free_irq(struct dvobj_priv *dvobj) { - PSDIO_DATA psdio_data; + struct sdio_data *psdio_data; struct sdio_func *func; int err; @@ -176,7 +176,7 @@ static void gpio_hostwakeup_free_irq(struct adapter *padapter) static u32 sdio_init(struct dvobj_priv *dvobj) { - PSDIO_DATA psdio_data; + struct sdio_data *psdio_data; struct sdio_func *func; int err; @@ -248,7 +248,7 @@ static struct dvobj_priv *sdio_dvobj_init(struct sdio_func *func) { int status = _FAIL; struct dvobj_priv *dvobj = NULL; - PSDIO_DATA psdio; + struct sdio_data *psdio; dvobj = devobj_init(); if (dvobj == NULL) { @@ -327,7 +327,7 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct int status = _FAIL; struct net_device *pnetdev; struct adapter *padapter = NULL; - PSDIO_DATA psdio = &dvobj->intf_data; + struct sdio_data *psdio = &dvobj->intf_data; padapter = vzalloc(sizeof(*padapter)); if (padapter == NULL) { diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c b/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c index 43a9d922e3aa..1787534487b4 100644 --- a/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c +++ b/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c @@ -12,7 +12,7 @@ static bool rtw_sdio_claim_host_needed(struct sdio_func *func) { struct dvobj_priv *dvobj = sdio_get_drvdata(func); - PSDIO_DATA sdio_data = &dvobj->intf_data; + struct sdio_data *sdio_data = &dvobj->intf_data; if (sdio_data->sys_sdio_irq_thd && sdio_data->sys_sdio_irq_thd == current) return false; @@ -21,7 +21,7 @@ static bool rtw_sdio_claim_host_needed(struct sdio_func *func) inline void rtw_sdio_set_irq_thd(struct dvobj_priv *dvobj, void *thd_hdl) { - PSDIO_DATA sdio_data = &dvobj->intf_data; + struct sdio_data *sdio_data = &dvobj->intf_data; sdio_data->sys_sdio_irq_thd = thd_hdl; } @@ -30,7 +30,7 @@ u8 sd_f0_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err) { struct adapter *padapter; struct dvobj_priv *psdiodev; - PSDIO_DATA psdio; + struct sdio_data *psdio; u8 v = 0; struct sdio_func *func; @@ -67,7 +67,7 @@ s32 _sd_cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata) { struct adapter *padapter; struct dvobj_priv *psdiodev; - PSDIO_DATA psdio; + struct sdio_data *psdio; int err = 0, i; struct sdio_func *func; @@ -102,7 +102,7 @@ s32 sd_cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata) { struct adapter *padapter; struct dvobj_priv *psdiodev; - PSDIO_DATA psdio; + struct sdio_data *psdio; int err = 0; struct sdio_func *func; @@ -137,7 +137,7 @@ s32 _sd_cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata) { struct adapter *padapter; struct dvobj_priv *psdiodev; - PSDIO_DATA psdio; + struct sdio_data *psdio; int err = 0, i; struct sdio_func *func; @@ -172,7 +172,7 @@ s32 sd_cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata) { struct adapter *padapter; struct dvobj_priv *psdiodev; - PSDIO_DATA psdio; + struct sdio_data *psdio; int err = 0; struct sdio_func *func; @@ -202,7 +202,7 @@ u8 sd_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err) { struct adapter *padapter; struct dvobj_priv *psdiodev; - PSDIO_DATA psdio; + struct sdio_data *psdio; u8 v = 0; struct sdio_func *func; @@ -234,7 +234,7 @@ u32 sd_read32(struct intf_hdl *pintfhdl, u32 addr, s32 *err) { struct adapter *padapter; struct dvobj_priv *psdiodev; - PSDIO_DATA psdio; + struct sdio_data *psdio; u32 v = 0; struct sdio_func *func; bool claim_needed; @@ -299,7 +299,7 @@ void sd_write8(struct intf_hdl *pintfhdl, u32 addr, u8 v, s32 *err) { struct adapter *padapter; struct dvobj_priv *psdiodev; - PSDIO_DATA psdio; + struct sdio_data *psdio; struct sdio_func *func; bool claim_needed; @@ -328,7 +328,7 @@ void sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err) { struct adapter *padapter; struct dvobj_priv *psdiodev; - PSDIO_DATA psdio; + struct sdio_data *psdio; struct sdio_func *func; bool claim_needed; @@ -404,7 +404,7 @@ s32 _sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata) { struct adapter *padapter; struct dvobj_priv *psdiodev; - PSDIO_DATA psdio; + struct sdio_data *psdio; int err = -EPERM; struct sdio_func *func; @@ -461,7 +461,7 @@ s32 sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata) { struct adapter *padapter; struct dvobj_priv *psdiodev; - PSDIO_DATA psdio; + struct sdio_data *psdio; struct sdio_func *func; bool claim_needed; @@ -505,7 +505,7 @@ s32 _sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata) { struct adapter *padapter; struct dvobj_priv *psdiodev; - PSDIO_DATA psdio; + struct sdio_data *psdio; struct sdio_func *func; u32 size; @@ -565,7 +565,7 @@ s32 sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata) { struct adapter *padapter; struct dvobj_priv *psdiodev; - PSDIO_DATA psdio; + struct sdio_data *psdio; struct sdio_func *func; bool claim_needed; s32 err = -EPERM; |