diff --git a/Makefile b/Makefile index 3eb4da1..70fdf6c 100755 --- a/Makefile +++ b/Makefile @@ -105,6 +105,8 @@ CONFIG_RTW_SDIO_PM_KEEP_POWER = y CONFIG_MP_VHT_HW_TX_MODE = n ###################### Platform Related ####################### CONFIG_PLATFORM_I386_PC = y +CONFIG_PLATFORM_ARM_RPI = n +CONFIG_PLATFORM_ARM64_RPI = n CONFIG_PLATFORM_ANDROID_X86 = n CONFIG_PLATFORM_ANDROID_INTEL_X86 = n CONFIG_PLATFORM_JB_X86 = n @@ -163,6 +165,8 @@ CONFIG_PLATFORM_NV_TK1_UBUNTU = n CONFIG_PLATFORM_RTL8197D = n CONFIG_PLATFORM_AML_S905 = n CONFIG_PLATFORM_ZTE_ZX296716 = n +CONFIG_PLATFORM_ARM_ODROIDC2 = n +CONFIG_PLATFORM_PPC = n ############################################################### CONFIG_DRVEXT_MODULE = n @@ -1040,7 +1044,7 @@ EXTRA_CFLAGS += -DDM_ODM_SUPPORT_TYPE=0x04 ifeq ($(CONFIG_PLATFORM_I386_PC), y) EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -SUBARCH := $(shell uname -m | sed -e s/i.86/i386/) +SUBARCH := $(shell uname -m | sed -e "s/i.86/i386/; s/ppc/powerpc/; s/armv.l/arm/; s/aarch64/arm64/;") ARCH ?= $(SUBARCH) CROSS_COMPILE ?= KVER := $(shell uname -r) @@ -1050,6 +1054,50 @@ INSTALL_PREFIX := STAGINGMODDIR := /lib/modules/$(KVER)/kernel/drivers/staging endif +ifeq ($(CONFIG_PLATFORM_ARM_RPI), y) +EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN +EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT +ARCH ?= arm +CROSS_COMPILE ?= +KVER ?= $(shell uname -r) +KSRC := /lib/modules/$(KVER)/build +MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ +INSTALL_PREFIX := +endif + +ifeq ($(CONFIG_PLATFORM_ARM64_RPI), y) +EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN +EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT +ARCH ?= arm64 +CROSS_COMPILE ?= +KVER ?= $(shell uname -r) +KSRC := /lib/modules/$(KVER)/build +MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ +INSTALL_PREFIX := +endif + +ifeq ($(CONFIG_PLATFORM_ARM_ODROIDC2), y) +EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN +EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT +ARCH ?= arm64 +CROSS_COMPILE ?= +KVER ?= $(shell uname -r) +KSRC := /lib/modules/$(KVER)/build +MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ +INSTALL_PREFIX := +endif + +ifeq ($(CONFIG_PLATFORM_PPC), y) +EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN +SUBARCH := $(shell uname -m | sed -e s/ppc/powerpc/) +ARCH ?= $(SUBARCH) +CROSS_COMPILE ?= +KVER ?= $(shell uname -r) +KSRC := /lib/modules/$(KVER)/build +MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ +INSTALL_PREFIX := +endif + ifeq ($(CONFIG_PLATFORM_NV_TK1), y) EXTRA_CFLAGS += -DCONFIG_PLATFORM_NV_TK1 EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN diff --git a/README.md b/README.md index c14310c..aa230a0 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,15 @@ # Realtek rtl8188eus & rtl8188eu & rtl8188etv WiFi driver -[![Monitor mode](https://img.shields.io/badge/monitor%20mode-working-brightgreen.svg)](#) -[![Frame Injection](https://img.shields.io/badge/frame%20injection-working-brightgreen.svg)](#) +[![Monitor mode](https://img.shields.io/badge/monitor%20mode-supported-brightgreen.svg)](#) +[![Frame Injection](https://img.shields.io/badge/monitor%20mode-supported-brightgreen.svg)](#) +[![MESH Mode](https://img.shields.io/badge/mesh%20mode-supported-brightgreen.svg)](#) [![GitHub issues](https://img.shields.io/github/issues/kimocoder/rtl8188eus.svg)](https://github.com/kimocoder/rtl8188eus/issues) [![GitHub forks](https://img.shields.io/github/forks/kimocoder/rtl8188eus.svg)](https://github.com/kimocoder/rtl8188eus/network) [![GitHub stars](https://img.shields.io/github/stars/kimocoder/rtl8188eus.svg)](https://github.com/kimocoder/rtl8188eus/stargazers) -[![GitHub license](https://img.shields.io/github/license/kimocoder/rtl8812au.svg)](https://github.com/kimocoder/rtl8188eus/blob/master/LICENSE) - -This driver supports: -* Android 8 -* MESH Mode Operation -* .. and kernels up to v5.0+ (rc3 tested) +[![GitHub license](https://img.shields.io/github/license/kimocoder/rtl8812au.svg)](https://github.com/kimocoder/rtl8188eus/blob/master/LICENSE)
+[![Android](https://img.shields.io/badge/android%20(8)-supported-brightgreen.svg)](#) +[![aircrack-ng](https://img.shields.io/badge/aircrack--ng-supported-blue.svg)](#) This is a pure Realtek release, not from vendor but from all the Realtek multichip "bases" we've seen, this must be the newest, most stable and effective one. @@ -52,15 +50,13 @@ unmanaged-devices=mac:A7:A7:A7:A7:A7 * Finish the walkthrough of the base for understanding. * Fix a issue where the interface is down on startup * Fix the out of bounds reference -* Add support for more platforms, - RPI, generic ARM/ARM64, Odroid, PPC .. +* Supress some debug messages (dmesg) about powersaving * There is a bug in monitor mode related to Network-Manager. This needs priority because it causes interferrence. * Add HT (RX) Greenfield capabilities * pcap_activate error on "reaver" - investigate * Go through the VHT. * Add DKMS support -* Finish up badges * Add/upload the documentation * Add more VID/PIDS for all 3 chipsets supported.
diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 32f9eae..87f9dc4 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -41,7 +41,6 @@ void free_mlme_ap_info(_adapter *padapter) struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); stop_ap_mode(padapter); - _rtw_spinlock_free(&pmlmepriv->bcn_update_lock); } @@ -62,7 +61,7 @@ u8 rtw_set_tim_ie(u8 dtim_cnt, u8 dtim_period if (tim_bmp[i]) break; n1 = i & 0xFE; - + /* find the last nonzero octet in tim_bitmap, except octet 0 */ for (i = tim_bmp_len - 1; i > 0; i--) if (tim_bmp[i]) @@ -2384,9 +2383,6 @@ static void _rtw_macaddr_acl_deinit(_adapter *adapter, u8 period, bool clear_onl } _exit_critical_bh(&(acl_node_q->lock), &irqL); - if (!clear_only) - _rtw_spinlock_free(&(acl_node_q->lock)); - rtw_warn_on(acl->num); acl->mode = RTW_ACL_MODE_DISABLED; } @@ -4037,9 +4033,7 @@ void stop_ap_mode(_adapter *padapter) rtw_warn_on(1); pmlmepriv->update_bcn = _FALSE; - /*pmlmeext->bstart_bss = _FALSE;*/ padapter->netif_up = _FALSE; - /* _rtw_spinlock_free(&pmlmepriv->bcn_update_lock); */ /* reset and init security priv , this can refine with rtw_reset_securitypriv */ _rtw_memset((unsigned char *)&padapter->securitypriv, 0, sizeof(struct security_priv)); diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 6ed77d2..c696845 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -224,7 +224,6 @@ void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) { if (pcmdpriv) { - _rtw_spinlock_free(&(pcmdpriv->cmd_queue.lock)); _rtw_free_sema(&(pcmdpriv->cmd_queue_sema)); /* _rtw_free_sema(&(pcmdpriv->cmd_done_sema)); */ _rtw_free_sema(&(pcmdpriv->start_cmdthread_sema)); diff --git a/core/rtw_debug.c b/core/rtw_debug.c index a1537b3..40d2996 100644 --- a/core/rtw_debug.c +++ b/core/rtw_debug.c @@ -42,7 +42,6 @@ const char *rtw_log_level_str[] = { void dump_drv_version(void *sel) { RTW_PRINT_SEL(sel, "%s %s\n", DRV_NAME, DRIVERVERSION); - RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__); } void dump_drv_cfg(void *sel) diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index 7b62d0d..ca3ef60 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -146,7 +146,7 @@ sint _rtw_init_mlme_priv(_adapter *padapter) #if defined(CONFIG_RTW_WNM) || defined(CONFIG_RTW_80211K) rtw_roam_nb_info_init(padapter); pmlmepriv->ch_cnt = 0; -#endif +#endif #endif rtw_init_mlme_timer(padapter); @@ -156,12 +156,8 @@ exit: return res; } -void rtw_mfree_mlme_priv_lock(struct mlme_priv *pmlmepriv); void rtw_mfree_mlme_priv_lock(struct mlme_priv *pmlmepriv) { - _rtw_spinlock_free(&pmlmepriv->lock); - _rtw_spinlock_free(&(pmlmepriv->free_bss_pool.lock)); - _rtw_spinlock_free(&(pmlmepriv->scanned_queue.lock)); } static void rtw_free_mlme_ie_data(u8 **ppie, u32 *plen) diff --git a/core/rtw_recv.c b/core/rtw_recv.c index 13e1da9..3441b4e 100755 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -157,19 +157,9 @@ exit: void rtw_mfree_recv_priv_lock(struct recv_priv *precvpriv); void rtw_mfree_recv_priv_lock(struct recv_priv *precvpriv) { - _rtw_spinlock_free(&precvpriv->lock); #ifdef CONFIG_RECV_THREAD_MODE _rtw_free_sema(&precvpriv->recv_sema); #endif - - _rtw_spinlock_free(&precvpriv->free_recv_queue.lock); - _rtw_spinlock_free(&precvpriv->recv_pending_queue.lock); - - _rtw_spinlock_free(&precvpriv->free_recv_buf_queue.lock); - -#ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX - _rtw_spinlock_free(&precvpriv->recv_buf_pending_queue.lock); -#endif /* CONFIG_USE_USB_BUFFER_ALLOC_RX */ } void _rtw_free_recv_priv(struct recv_priv *precvpriv) diff --git a/core/rtw_sta_mgt.c b/core/rtw_sta_mgt.c index 17c0257..a2a0781 100644 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -350,43 +350,22 @@ inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int return (struct sta_info *)(stapriv->pstainfo_buf + offset * sizeof(struct sta_info)); } -void _rtw_free_sta_xmit_priv_lock(struct sta_xmit_priv *psta_xmitpriv); void _rtw_free_sta_xmit_priv_lock(struct sta_xmit_priv *psta_xmitpriv) { - - _rtw_spinlock_free(&psta_xmitpriv->lock); - - _rtw_spinlock_free(&(psta_xmitpriv->be_q.sta_pending.lock)); - _rtw_spinlock_free(&(psta_xmitpriv->bk_q.sta_pending.lock)); - _rtw_spinlock_free(&(psta_xmitpriv->vi_q.sta_pending.lock)); - _rtw_spinlock_free(&(psta_xmitpriv->vo_q.sta_pending.lock)); } static void _rtw_free_sta_recv_priv_lock(struct sta_recv_priv *psta_recvpriv) { - - _rtw_spinlock_free(&psta_recvpriv->lock); - - _rtw_spinlock_free(&(psta_recvpriv->defrag_q.lock)); - - } -void rtw_mfree_stainfo(struct sta_info *psta); void rtw_mfree_stainfo(struct sta_info *psta) { - - if (&psta->lock != NULL) - _rtw_spinlock_free(&psta->lock); - _rtw_free_sta_xmit_priv_lock(&psta->sta_xmitpriv); _rtw_free_sta_recv_priv_lock(&psta->sta_recvpriv); - } /* this function is used to free the memory of lock || sema for all stainfos */ -void rtw_mfree_all_stainfo(struct sta_priv *pstapriv); void rtw_mfree_all_stainfo(struct sta_priv *pstapriv) { _irqL irqL; @@ -415,18 +394,6 @@ void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv); void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv) { rtw_mfree_all_stainfo(pstapriv); /* be done before free sta_hash_lock */ - - _rtw_spinlock_free(&pstapriv->free_sta_queue.lock); - - _rtw_spinlock_free(&pstapriv->sta_hash_lock); - _rtw_spinlock_free(&pstapriv->wakeup_q.lock); - _rtw_spinlock_free(&pstapriv->sleep_q.lock); - -#ifdef CONFIG_AP_MODE - _rtw_spinlock_free(&pstapriv->asoc_list_lock); - _rtw_spinlock_free(&pstapriv->auth_list_lock); -#endif - } u32 _rtw_free_sta_priv(struct sta_priv *pstapriv) @@ -821,8 +788,6 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta) rtw_st_ctl_deinit(&psta->st_ctl); if (is_pre_link_sta == _FALSE) { - _rtw_spinlock_free(&psta->lock); - /* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL0); */ _enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL0); rtw_list_insert_tail(&psta->list, get_list_head(pfree_sta_queue)); @@ -1309,7 +1274,7 @@ void rtw_pre_link_sta_ctl_deinit(struct sta_priv *stapriv) rtw_pre_link_sta_ctl_reset(stapriv); - _rtw_spinlock_free(&pre_link_sta_ctl->lock); + } } void dump_pre_link_sta_ctl(void *sel, struct sta_priv *stapriv) diff --git a/core/rtw_tdls.c b/core/rtw_tdls.c index 07395fc..c682ece 100644 --- a/core/rtw_tdls.c +++ b/core/rtw_tdls.c @@ -88,11 +88,7 @@ int rtw_init_tdls_info(_adapter *padapter) void rtw_free_tdls_info(struct tdls_info *ptdlsinfo) { - _rtw_spinlock_free(&ptdlsinfo->cmd_lock); - _rtw_spinlock_free(&ptdlsinfo->hdl_lock); - _rtw_memset(ptdlsinfo, 0, sizeof(struct tdls_info)); - } void rtw_free_all_tdls_sta(_adapter *padapter, u8 enqueue_cmd) diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c index c26434f..b9a8944 100644 --- a/core/rtw_wlan_util.c +++ b/core/rtw_wlan_util.c @@ -3883,7 +3883,6 @@ inline void rtw_macid_ctl_init(struct macid_ctl_t *macid_ctl) inline void rtw_macid_ctl_deinit(struct macid_ctl_t *macid_ctl) { - _rtw_spinlock_free(&macid_ctl->lock); } inline bool rtw_bmp_is_set(const u8 *bmp, u8 bmp_len, u8 id) diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index b480319..6e4174b 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -65,8 +65,6 @@ void rtw_init_xmit_block(_adapter *padapter) void rtw_free_xmit_block(_adapter *padapter) { struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); - - _rtw_spinlock_free(&dvobj->xmit_block_lock); } s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter) @@ -357,24 +355,8 @@ exit: return res; } -void rtw_mfree_xmit_priv_lock(struct xmit_priv *pxmitpriv); void rtw_mfree_xmit_priv_lock(struct xmit_priv *pxmitpriv) { - _rtw_spinlock_free(&pxmitpriv->lock); - _rtw_free_sema(&pxmitpriv->xmit_sema); - - _rtw_spinlock_free(&pxmitpriv->be_pending.lock); - _rtw_spinlock_free(&pxmitpriv->bk_pending.lock); - _rtw_spinlock_free(&pxmitpriv->vi_pending.lock); - _rtw_spinlock_free(&pxmitpriv->vo_pending.lock); - _rtw_spinlock_free(&pxmitpriv->bm_pending.lock); - - /* _rtw_spinlock_free(&pxmitpriv->legacy_dz_queue.lock); */ - /* _rtw_spinlock_free(&pxmitpriv->apsd_queue.lock); */ - - _rtw_spinlock_free(&pxmitpriv->free_xmit_queue.lock); - _rtw_spinlock_free(&pxmitpriv->free_xmitbuf_queue.lock); - _rtw_spinlock_free(&pxmitpriv->pending_xmitbuf_queue.lock); } @@ -421,10 +403,6 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv) } if (pxmitpriv->xframe_ext_alloc_addr) rtw_vmfree(pxmitpriv->xframe_ext_alloc_addr, NR_XMIT_EXTBUFF * sizeof(struct xmit_frame) + 4); - _rtw_spinlock_free(&pxmitpriv->free_xframe_ext_queue.lock); - - /* free xmit extension buff */ - _rtw_spinlock_free(&pxmitpriv->free_xmit_extbuf_queue.lock); pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf; for (i = 0; i < NR_XMIT_EXTBUFF; i++) { diff --git a/hal/hal_com.c b/hal/hal_com.c index aa06342..452255d 100644 --- a/hal/hal_com.c +++ b/hal/hal_com.c @@ -2292,9 +2292,6 @@ bool rtw_sec_read_cam_is_gk(_adapter *adapter, u8 id) #ifdef CONFIG_MBSSID_CAM void rtw_mbid_cam_init(struct dvobj_priv *dvobj) { - struct mbid_cam_ctl_t *mbid_cam_ctl = &dvobj->mbid_cam_ctl; - - _rtw_spinlock_init(&mbid_cam_ctl->lock); mbid_cam_ctl->bitmap = 0; ATOMIC_SET(&mbid_cam_ctl->mbid_entry_num, 0); _rtw_memset(&dvobj->mbid_cam_cache, 0, sizeof(dvobj->mbid_cam_cache)); diff --git a/hal/hal_intf.c b/hal/hal_intf.c index 184d28a..d818bc8 100644 --- a/hal/hal_intf.c +++ b/hal/hal_intf.c @@ -145,8 +145,6 @@ void rtw_hal_dm_deinit(_adapter *padapter) PHAL_DATA_TYPE pHalData = GET_HAL_DATA(padapter); padapter->hal_func.dm_deinit(padapter); - - _rtw_spinlock_free(&pHalData->IQKSpinLock); } } diff --git a/hal/rtl8188e/rtl8188e_dm.c b/hal/rtl8188e/rtl8188e_dm.c index 8c3bb5b..fe66db1 100644 --- a/hal/rtl8188e/rtl8188e_dm.c +++ b/hal/rtl8188e/rtl8188e_dm.c @@ -305,13 +305,12 @@ void rtl8188e_init_dm_priv(IN PADAPTER Adapter) /* _rtw_spinlock_init(&(pHalData->odm_stainfo_lock)); */ Init_ODM_ComInfo_88E(Adapter); odm_init_all_timers(podmpriv); - + pHalData->CurrentTxPwrIdx = 13; } void rtl8188e_deinit_dm_priv(IN PADAPTER Adapter) { PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter); struct dm_struct *podmpriv = &pHalData->odmpriv; - /* _rtw_spinlock_free(&pHalData->odm_stainfo_lock); */ odm_cancel_all_timers(podmpriv); } diff --git a/include/hal_data.h b/include/hal_data.h index 0d3bb5e..35d7c2d 100755 --- a/include/hal_data.h +++ b/include/hal_data.h @@ -475,6 +475,7 @@ typedef struct hal_com_data { u8 txpwr_limit_loaded:1; u8 txpwr_limit_from_file:1; u8 rf_power_tracking_type; + u8 CurrentTxPwrIdx; /* Read/write are allow for following hardware information variables */ u8 crystal_cap; diff --git a/include/osdep_service.h b/include/osdep_service.h index 442f0a7..8d9c08a 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -325,7 +325,6 @@ extern void _rtw_mutex_free(_mutex *pmutex); #ifndef PLATFORM_FREEBSD extern void _rtw_spinlock_init(_lock *plock); #endif /* PLATFORM_FREEBSD */ -extern void _rtw_spinlock_free(_lock *plock); extern void _rtw_spinlock(_lock *plock); extern void _rtw_spinunlock(_lock *plock); extern void _rtw_spinlock_ex(_lock *plock); diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 31e920d..2642875 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -3925,6 +3925,26 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy, enum tx_power_setting type, int dbm) #endif { + +_adapter *padapter = wiphy_to_adapter(wiphy); +HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); +int value; +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) || defined(COMPAT_KERNEL_RELEASE) + value = mbm/100; +#else + value = dbm; +#endif + +if(value < 0) + value = 0; +if(value > 40) + value = 40; + +if(type == NL80211_TX_POWER_FIXED) { + pHalData->CurrentTxPwrIdx = value; + rtw_hal_set_tx_power_level(padapter, pHalData->current_channel); +} else + return -EOPNOTSUPP; #if 0 struct iwm_priv *iwm = wiphy_to_iwm(wiphy); int ret; @@ -3961,9 +3981,13 @@ static int cfg80211_rtw_get_txpower(struct wiphy *wiphy, #endif int *dbm) { + _adapter *padapter = wiphy_to_adapter(wiphy); + HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); + RTW_INFO("%s\n", __func__); - *dbm = (12); + // *dbm = (12); + *dbm = pHalData->CurrentTxPwrIdx; return 0; } @@ -9533,12 +9557,9 @@ void rtw_wdev_free(struct wireless_dev *wdev) struct rtw_wdev_priv *wdev_priv = adapter_wdev_data(adapter); _irqL irqL; - _rtw_spinlock_free(&wdev_priv->scan_req_lock); - _enter_critical_bh(&wdev_priv->connect_req_lock, &irqL); rtw_wdev_free_connect_req(wdev_priv); _exit_critical_bh(&wdev_priv->connect_req_lock, &irqL); - _rtw_spinlock_free(&wdev_priv->connect_req_lock); _rtw_mutex_free(&wdev_priv->roch_mutex); } diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 02abb34..d6a5af8 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -2109,7 +2109,6 @@ void devobj_deinit(struct dvobj_priv *pdvobj) #ifdef CONFIG_MCC_MODE _rtw_mutex_free(&(pdvobj->mcc_objpriv.mcc_mutex)); - _rtw_spinlock_free(&pdvobj->mcc_objpriv.mcc_lock); #endif /* CONFIG_MCC_MODE */ _rtw_mutex_free(&pdvobj->hw_init_mutex); @@ -2127,7 +2126,6 @@ void devobj_deinit(struct dvobj_priv *pdvobj) #endif rtw_macid_ctl_deinit(&pdvobj->macid_ctl); - _rtw_spinlock_free(&pdvobj->cam_ctl.lock); _rtw_mutex_free(&pdvobj->cam_ctl.sec_cam_access_mutex); #if defined(RTK_129X_PLATFORM) && defined(CONFIG_PCI_HCI) @@ -2137,8 +2135,6 @@ void devobj_deinit(struct dvobj_priv *pdvobj) rtw_mbid_cam_deinit(pdvobj); #endif - _rtw_spinlock_free(&(pdvobj->ap_if_q.lock)); - rtw_mfree((u8 *)pdvobj, sizeof(*pdvobj)); } @@ -2468,12 +2464,6 @@ u8 rtw_free_drv_sw(_adapter *padapter) } } #endif - /* add for CONFIG_IEEE80211W, none 11w also can use */ - _rtw_spinlock_free(&padapter->security_key_mutex); - -#ifdef CONFIG_BR_EXT - _rtw_spinlock_free(&padapter->br_ext_lock); -#endif /* CONFIG_BR_EXT */ #ifdef CONFIG_INTEL_WIDI rtw_free_intel_widi(padapter); diff --git a/os_dep/linux/usb_intf.c b/os_dep/linux/usb_intf.c index 9f79548..77dc6b8 100644 --- a/os_dep/linux/usb_intf.c +++ b/os_dep/linux/usb_intf.c @@ -153,11 +153,11 @@ static struct usb_device_id rtw_usb_id_tbl[] = { {USB_DEVICE(0x07B8, 0x8179), .driver_info = RTL8188E}, /* TP-Link */ {USB_DEVICE(0x0BDA, 0x8179), .driver_info = RTL8188E}, /* Abocom - Abocom */ {USB_DEVICE(0x2357, 0x010c), .driver_info = RTL8188E}, /* TP-WL722n v2/v3/v4 */ - {USB_DEVICE(0x0DF6, 0x0076), .driver_info = RTL8188E}, /* Sitecom N150 v2 */ \ - {USB_DEVICE(0x2001, 0x330F), .driver_info = RTL8188E}, /* DLink DWA-125 REV D1 */ \ - {USB_DEVICE(0x2001, 0x3310), .driver_info = RTL8188E}, /* Dlink DWA-123 REV D1 */ \ - {USB_DEVICE(0x2001, 0x3311), .driver_info = RTL8188E}, /* DLink GO-USB-N150 REV B1 */ \ - {USB_DEVICE(0x056E, 0x4008), .driver_info = RTL8188E}, /* Elecom WDC-150SU2M */ \ + {USB_DEVICE(0x0DF6, 0x0076), .driver_info = RTL8188E}, /* Sitecom N150 v2 */ + {USB_DEVICE(0x2001, 0x330F), .driver_info = RTL8188E}, /* DLink DWA-125 REV D1 */ + {USB_DEVICE(0x2001, 0x3310), .driver_info = RTL8188E}, /* Dlink DWA-123 REV D1 */ + {USB_DEVICE(0x2001, 0x3311), .driver_info = RTL8188E}, /* DLink GO-USB-N150 REV B1 */ + {USB_DEVICE(0x056E, 0x4008), .driver_info = RTL8188E}, /* Elecom WDC-150SU2M */ #endif #ifdef CONFIG_RTL8812A diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 2dca007..1a044e6 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -1398,19 +1398,6 @@ void _rtw_spinlock_init(_lock *plock) } -void _rtw_spinlock_free(_lock *plock) -{ -#ifdef PLATFORM_FREEBSD - mtx_destroy(plock); -#endif - -#ifdef PLATFORM_WINDOWS - - NdisFreeSpinLock(plock); - -#endif - -} #ifdef PLATFORM_FREEBSD extern PADAPTER prtw_lock; @@ -1517,7 +1504,6 @@ void _rtw_init_queue(_queue *pqueue) void _rtw_deinit_queue(_queue *pqueue) { - _rtw_spinlock_free(&(pqueue->lock)); } u32 _rtw_queue_empty(_queue *pqueue)