Merge pull request #3 from kimocoder/v5.3.9

Merge changes
This commit is contained in:
Christian Bremvåg 2019-05-24 16:55:48 +02:00 committed by GitHub
commit cd7a48f950
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 8256 additions and 107 deletions

View File

@ -18,15 +18,24 @@ The performance and code quality has been improved and thats about time.
# HowTo build/install
1. You will need to blacklist another driver in order to use this one instead of the kernel provided.
We included a "realtek_blacklist.conf" file in the folder. "cp realtek_blacklist.conf /etc/modprobe.d"
We included a "realtek_blacklist.conf" file in the folder:<br>
2. "cp realtek_blacklist.conf /etc/modprobe.d/"<br>
3. "make && make install"<br>
4. "rmmod r8188eu && insmod rtl8188eu"
4. "rmmod 8188eu && insmod 8188eu.ko"
# MONITOR MODE ATTENTION
There is a bug or interferrence with the driver and/or Network-Manager,
so if you wan't to use the monitor mode, DON'T kill the network-manager or use airmon-ng (infact)
# MONITOR MODE howto
Use these steps to enter monitor mode.
```
airmon-ng check-kill
ip link set <interface> down
iw dev <interface> set type monitor
```
Frame injection test may be performed with
```
aireplay -9 <interface>
```
<b>FIX:</b>
# NetworkManager configuration
Add these lines below to "NetworkManager.conf" and ADD YOUR ADAPTER MAC below [keyfile]
This will make the Network-Manager ignore the device, and therefor don't cause problems.
```
@ -47,11 +56,16 @@ unmanaged-devices=mac:A7:A7:A7:A7:A7
```
# TODO
* Fix a issue where the interface is down on startup
* Implement txpower control
* Finish up the elimination of the wrapper _rtw_memset.
I didn't have more time after "rtw_beamforming.c"
* Check code with checkpatch.pl (found in "tools")
* There is a bug in monitor mode related to Network-Manager.
This needs priority because it causes interferrence.
* pcap_activate error on "reaver" - investigate
* Add/upload the documentation
* Add more VID/PIDS for all 3 chipsets supported.

View File

@ -4355,7 +4355,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
unsigned char *pframe;
u8 dummybuf[32];
int len = skb->len, rtap_len;
int len = skb->len, rtap_len, consume;
if (skb)
rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, skb->truesize);
@ -4372,12 +4372,15 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
if (unlikely(skb->len < rtap_len))
goto fail;
if (rtap_len != 12) {
RTW_INFO("radiotap len (should be 14): %d\n", rtap_len);
goto fail;
len -= sizeof(struct ieee80211_radiotap_header);
rtap_len -= sizeof(struct ieee80211_radiotap_header);
while(rtap_len) {
consume = rtap_len > sizeof(dummybuf) ? sizeof(dummybuf) : rtap_len;
_rtw_pktfile_read(&pktfile, dummybuf, consume);
rtap_len -= consume;
len -= consume;
}
_rtw_pktfile_read(&pktfile, dummybuf, rtap_len-sizeof(struct ieee80211_radiotap_header));
len = len - rtap_len;
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
if (pmgntframe == NULL) {

View File

@ -1,5 +1,5 @@
PACKAGE_NAME="realtek-rtl8188eus"
PACKAGE_VERSION="5.3.9~20190214"
PACKAGE_VERSION="5.3.9~20190215"
CLEAN="'make' clean"
BUILT_MODULE_NAME[0]=8188eu
PROCS_NUM=`nproc`

View File

@ -761,7 +761,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
pbuf = rtw_zmalloc(buf_size);
if (pbuf == NULL) {
RTW_INFO("%s pbuf allocate failed !!\n", __FUNCTION__);
RTW_INFO("%s pbuf allocate failed !!\n", __func__);
return bss;
}
@ -769,7 +769,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
bssinf_len = pnetwork->network.IELength + sizeof(struct rtw_ieee80211_hdr_3addr);
if (bssinf_len > buf_size) {
RTW_INFO("%s IE Length too long > %zu byte\n", __FUNCTION__, buf_size);
RTW_INFO("%s IE Length too long > %zu byte\n", __func__, buf_size);
goto exit;
}
@ -779,7 +779,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
if (rtw_get_wapi_ie(pnetwork->network.IEs, pnetwork->network.IELength, NULL, &wapi_len) > 0) {
if (wapi_len > 0) {
RTW_INFO("%s, no support wapi!\n", __FUNCTION__);
RTW_INFO("%s, no support wapi!\n", __func__);
goto exit;
}
}
@ -1237,7 +1237,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
struct security_priv *psecuritypriv = &(padapter->securitypriv);
struct sta_priv *pstapriv = &padapter->stapriv;
RTW_INFO("%s\n", __FUNCTION__);
RTW_INFO("%s\n", __func__);
param->u.crypt.err = 0;
param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0';
@ -2458,7 +2458,7 @@ void rtw_cfg80211_indicate_scan_done(_adapter *adapter, bool aborted)
_enter_critical_bh(&pwdev_priv->scan_req_lock, &irqL);
if (pwdev_priv->scan_request != NULL) {
#ifdef CONFIG_DEBUG_CFG80211
RTW_INFO("%s with scan req\n", __FUNCTION__);
RTW_INFO("%s with scan req\n", __func__);
#endif
/* avoid WARN_ON(request != wiphy_to_dev(request->wiphy)->scan_req); */
@ -2474,7 +2474,7 @@ void rtw_cfg80211_indicate_scan_done(_adapter *adapter, bool aborted)
pwdev_priv->scan_request = NULL;
} else {
#ifdef CONFIG_DEBUG_CFG80211
RTW_INFO("%s without scan req\n", __FUNCTION__);
RTW_INFO("%s without scan req\n", __func__);
#endif
}
_exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL);
@ -2661,7 +2661,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(_adapter *padapter, char *buf, in
pmlmepriv->wps_probe_req_ie = rtw_malloc(wps_ielen);
if (pmlmepriv->wps_probe_req_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
@ -2692,7 +2692,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(_adapter *padapter, char *buf, in
pmlmepriv->p2p_probe_req_ie = rtw_malloc(p2p_ielen);
if (pmlmepriv->p2p_probe_req_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
@ -4287,11 +4287,6 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
if (unlikely(skb->len < rtap_len))
goto fail;
if (rtap_len != 14) {
RTW_INFO("radiotap len (should be 14): %d\n", rtap_len);
goto fail;
}
/* Skip the ratio tap header */
skb_pull(skb, rtap_len);
@ -5423,8 +5418,7 @@ static int cfg80211_rtw_change_station(struct wiphy *wiphy, struct net_device *n
goto release_plink_ctl;
}
}
}
else if (params->plink_state == NL80211_PLINK_HOLDING
} else if (params->plink_state == NL80211_PLINK_HOLDING
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
&& (params->sta_modify_mask & STATION_PARAM_APPLY_PLINK_STATE)
#endif
@ -7193,7 +7187,7 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy,
/* Debug purpose */
#if 1
RTW_INFO("%s %d\n", __FUNCTION__, __LINE__);
RTW_INFO("%s %d\n", __func__, __LINE__);
RTW_INFO("peer:"MAC_FMT", action code:%d, dialog:%d, status code:%d\n",
MAC_ARG(txmgmt.peer), txmgmt.action_code,
txmgmt.dialog_token, txmgmt.status_code);
@ -8379,6 +8373,7 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) {
struct pwrctrl_priv *pwrpriv;
struct mlme_priv *pmlmepriv;
padapter = wiphy_to_adapter(wiphy);
pwrpriv = adapter_to_pwrctl(padapter);
pmlmepriv = &padapter->mlmepriv;
struct sitesurvey_parm parm;
@ -8411,6 +8406,7 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) {
for (PNOWakeupScanWaitCnt = 0; PNOWakeupScanWaitCnt < 10; PNOWakeupScanWaitCnt++) {
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _FALSE)
break;
rtw_msleep_os(1000);
}
@ -8419,6 +8415,7 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) {
_exit_critical_bh(&pmlmepriv->lock, &irqL);
}
RTW_DBG("<== %s\n", __func__);
return 0;
@ -8457,7 +8454,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
pmlmepriv->wps_beacon_ie = rtw_malloc(wps_ielen);
if (pmlmepriv->wps_beacon_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
@ -8488,7 +8485,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
pmlmepriv -> p2p_beacon_ie = rtw_malloc(p2p_ielen);
if (pmlmepriv -> p2p_beacon_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
@ -8567,7 +8564,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
pmlmepriv->wps_probe_resp_ie = rtw_malloc(wps_ielen);
if (pmlmepriv->wps_probe_resp_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
@ -8636,7 +8633,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
pmlmepriv->p2p_probe_resp_ie = rtw_malloc(p2p_ielen);
if (pmlmepriv->p2p_probe_resp_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
@ -8648,11 +8645,12 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
pmlmepriv->p2p_go_probe_resp_ie_len = 0;
rtw_mfree(pmlmepriv->p2p_go_probe_resp_ie, free_len);
pmlmepriv->p2p_go_probe_resp_ie = NULL;
}
pmlmepriv->p2p_go_probe_resp_ie = rtw_malloc(p2p_ielen);
if (pmlmepriv->p2p_go_probe_resp_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
@ -8707,7 +8705,7 @@ static int rtw_cfg80211_set_assoc_resp_wpsp2pie(struct net_device *net, char *bu
pmlmepriv->wps_assoc_resp_ie = rtw_malloc(ie_len);
if (pmlmepriv->wps_assoc_resp_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
_rtw_memcpy(pmlmepriv->wps_assoc_resp_ie, ie, ie_len);
@ -8726,7 +8724,7 @@ static int rtw_cfg80211_set_assoc_resp_wpsp2pie(struct net_device *net, char *bu
pmlmepriv->p2p_assoc_resp_ie = rtw_malloc(ie_len);
if (pmlmepriv->p2p_assoc_resp_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
_rtw_memcpy(pmlmepriv->p2p_assoc_resp_ie, ie, ie_len);

View File

@ -127,7 +127,7 @@ int rtw_os_alloc_recvframe(_adapter *padapter, union recv_frame *precvframe, u8
res = _FAIL;
#else
if ((pattrib->mfrag == 1) && (pattrib->frag_num == 0)) {
RTW_INFO("%s: alloc_skb fail , drop frag frame\n", __FUNCTION__);
RTW_INFO("%s: alloc_skb fail , drop frag frame\n", __func__);
/* rtw_free_recvframe(precvframe, pfree_recv_queue); */
res = _FAIL;
goto exit_rtw_os_recv_resource_alloc;
@ -144,7 +144,7 @@ int rtw_os_alloc_recvframe(_adapter *padapter, union recv_frame *precvframe, u8
precvframe->u.hdr.rx_head = precvframe->u.hdr.rx_data = precvframe->u.hdr.rx_tail = pdata;
precvframe->u.hdr.rx_end = pdata + alloc_sz;
} else {
RTW_INFO("%s: rtw_skb_clone fail\n", __FUNCTION__);
RTW_INFO("%s: rtw_skb_clone fail\n", __func__);
/* rtw_free_recvframe(precvframe, pfree_recv_queue); */
/*exit_rtw_os_recv_resource_alloc;*/
res = _FAIL;
@ -305,7 +305,7 @@ _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, const u8 *da, const u8 *s
sub_skb->len = msdu_len;
skb_set_tail_pointer(sub_skb, msdu_len);
} else {
RTW_INFO("%s(): rtw_skb_clone() Fail!!!\n", __FUNCTION__);
RTW_INFO("%s(): rtw_skb_clone() Fail!!!\n", __func__);
return NULL;
}
}
@ -422,7 +422,7 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, union recv_frame *r
#endif
int ret;
/* Indicat the packets to upper layer */
/* Indicate the packets to upper layer */
if (pkt) {
struct ethhdr *ehdr = (struct ethhdr *)pkt->data;
@ -604,13 +604,13 @@ void rtw_hostapd_mlme_rx(_adapter *padapter, union recv_frame *precv_frame)
skb->len = precv_frame->u.hdr.len;
/* pskb_copy = rtw_skb_copy(skb);
* if(skb == NULL) goto _exit; */
if(skb == NULL) goto _exit; */
skb->dev = pmgnt_netdev;
skb->ip_summed = CHECKSUM_NONE;
skb->pkt_type = PACKET_OTHERHOST;
/* skb->protocol = __constant_htons(0x0019); ETH_P_80211_RAW */
skb->protocol = __constant_htons(0x0003); /*ETH_P_80211_RAW*/
skb->protocol = htons(0x0003); /*ETH_P_80211_RAW*/
/* RTW_INFO("(1)data=0x%x, head=0x%x, tail=0x%x, mac_header=0x%x, len=%d\n", skb->data, skb->head, skb->tail, skb->mac_header, skb->len); */

View File

@ -12,6 +12,7 @@
* more details.
*
*****************************************************************************/
#define _HCI_INTF_C_
#include <drv_types.h>
@ -65,12 +66,12 @@ static void rtw_dev_shutdown(struct device *dev)
#ifdef CONFIG_WOWLAN
#ifdef CONFIG_GPIO_WAKEUP
/*default wake up pin change to BT*/
RTW_INFO("%s:default wake up pin change to BT\n", __FUNCTION__);
RTW_INFO("%s:default wake up pin change to BT\n", __func__);
rtw_hal_switch_gpio_wl_ctrl(adapter, WAKEUP_GPIO_IDX, _FALSE);
#endif /* CONFIG_GPIO_WAKEUP */
if (pwrctl->wowlan_mode == _TRUE)
RTW_PRINT("%s wowlan_mode ==_TRUE do not run rtw_hal_deinit()\n", __FUNCTION__);
RTW_PRINT("%s wowlan_mode ==_TRUE do not run rtw_hal_deinit()\n", __func__);
else
#endif
{
@ -875,7 +876,7 @@ int rtw_hw_suspend(_adapter *padapter)
return 0;
error_exit:
RTW_INFO("%s, failed\n", __FUNCTION__);
RTW_INFO("%s, failed\n", __func__);
return -1;
}
@ -910,7 +911,7 @@ int rtw_hw_resume(_adapter *padapter)
return 0;
error_exit:
RTW_INFO("%s, Open net dev failed\n", __FUNCTION__);
RTW_INFO("%s, Open net dev failed\n", __func__);
return -1;
}
#endif
@ -930,7 +931,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
padapter = dvobj_get_primary_adapter(dvobj);
if (pwrpriv->bInSuspend == _TRUE) {
RTW_INFO("%s bInSuspend = %d\n", __FUNCTION__, pwrpriv->bInSuspend);
RTW_INFO("%s bInSuspend = %d\n", __func__, pwrpriv->bInSuspend);
pdbgpriv->dbg_suspend_error_cnt++;
goto exit;
}
@ -966,7 +967,7 @@ int rtw_resume_process(_adapter *padapter)
if (pwrpriv->bInSuspend == _FALSE) {
pdbgpriv->dbg_resume_error_cnt++;
RTW_INFO("%s bInSuspend = %d\n", __FUNCTION__, pwrpriv->bInSuspend);
RTW_INFO("%s bInSuspend = %d\n", __func__, pwrpriv->bInSuspend);
return -1;
}
@ -1043,7 +1044,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
padapter = dvobj_get_primary_adapter(dvobj);
pmlmeext = &padapter->mlmeextpriv;
RTW_INFO("==> %s (%s:%d)\n", __FUNCTION__, current->comm, current->pid);
RTW_INFO("==> %s (%s:%d)\n", __func__, current->comm, current->pid);
pdbgpriv->dbg_resume_cnt++;
#ifdef CONFIG_AUTOSUSPEND
@ -1073,7 +1074,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
}
pmlmeext->last_scan_time = rtw_get_current_time();
RTW_INFO("<======== %s return %d\n", __FUNCTION__, ret);
RTW_INFO("<======== %s return %d\n", __func__, ret);
return ret;
}

5
tools/README.txt Normal file
View File

@ -0,0 +1,5 @@
Howto use?
-------------------------------------------------------------------------------
./checkpatch.pl --no-tree -f sourcefile

6720
tools/checkpatch.pl Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,64 @@
acpi_dock_ops
address_space_operations
backlight_ops
block_device_operations
clk_ops
comedi_lrange
component_ops
dentry_operations
dev_pm_ops
dma_map_ops
driver_info
drm_connector_funcs
drm_encoder_funcs
drm_encoder_helper_funcs
ethtool_ops
extent_io_ops
file_lock_operations
file_operations
hv_ops
ide_dma_ops
ide_port_ops
inode_operations
intel_dvo_dev_ops
irq_domain_ops
item_operations
iwl_cfg
iwl_ops
kgdb_arch
kgdb_io
kset_uevent_ops
lock_manager_operations
machine_desc
microcode_ops
mlxsw_reg_info
mtrr_ops
neigh_ops
net_device_ops
nlmsvc_binding
nvkm_device_chip
of_device_id
pci_raw_ops
pipe_buf_operations
platform_hibernation_ops
platform_suspend_ops
proto_ops
regmap_access_table
rpc_pipe_ops
rtc_class_ops
sd_desc
seq_operations
sirfsoc_padmux
snd_ac97_build_ops
snd_soc_component_driver
soc_pcmcia_socket_ops
stacktrace_ops
sysfs_ops
tty_operations
uart_ops
usb_mon_operations
v4l2_ctrl_ops
v4l2_ioctl_ops
vm_operations_struct
wacom_features
wd_ops

1344
tools/spelling.txt Normal file

File diff suppressed because it is too large Load Diff