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 # HowTo build/install
1. You will need to blacklist another driver in order to use this one instead of the kernel provided. 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> 3. "make && make install"<br>
4. "rmmod r8188eu && insmod rtl8188eu" 4. "rmmod 8188eu && insmod 8188eu.ko"
# MONITOR MODE ATTENTION # MONITOR MODE howto
There is a bug or interferrence with the driver and/or Network-Manager, Use these steps to enter monitor mode.
so if you wan't to use the monitor mode, DON'T kill the network-manager or use airmon-ng (infact) ```
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] 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. 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 # TODO
* Fix a issue where the interface is down on startup * Implement txpower control
* Finish up the elimination of the wrapper _rtw_memset. * Finish up the elimination of the wrapper _rtw_memset.
I didn't have more time after "rtw_beamforming.c" 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. * There is a bug in monitor mode related to Network-Manager.
This needs priority because it causes interferrence. This needs priority because it causes interferrence.
* pcap_activate error on "reaver" - investigate * pcap_activate error on "reaver" - investigate
* Add/upload the documentation * Add/upload the documentation
* Add more VID/PIDS for all 3 chipsets supported. * 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); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
unsigned char *pframe; unsigned char *pframe;
u8 dummybuf[32]; u8 dummybuf[32];
int len = skb->len, rtap_len; int len = skb->len, rtap_len, consume;
if (skb) if (skb)
rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, skb->truesize); 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)) if (unlikely(skb->len < rtap_len))
goto fail; goto fail;
if (rtap_len != 12) { len -= sizeof(struct ieee80211_radiotap_header);
RTW_INFO("radiotap len (should be 14): %d\n", rtap_len); rtap_len -= sizeof(struct ieee80211_radiotap_header);
goto fail;
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); pmgntframe = alloc_mgtxmitframe(pxmitpriv);
if (pmgntframe == NULL) { if (pmgntframe == NULL) {

View File

@ -1,5 +1,5 @@
PACKAGE_NAME="realtek-rtl8188eus" PACKAGE_NAME="realtek-rtl8188eus"
PACKAGE_VERSION="5.3.9~20190214" PACKAGE_VERSION="5.3.9~20190215"
CLEAN="'make' clean" CLEAN="'make' clean"
BUILT_MODULE_NAME[0]=8188eu BUILT_MODULE_NAME[0]=8188eu
PROCS_NUM=`nproc` 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); pbuf = rtw_zmalloc(buf_size);
if (pbuf == NULL) { if (pbuf == NULL) {
RTW_INFO("%s pbuf allocate failed !!\n", __FUNCTION__); RTW_INFO("%s pbuf allocate failed !!\n", __func__);
return bss; 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); bssinf_len = pnetwork->network.IELength + sizeof(struct rtw_ieee80211_hdr_3addr);
if (bssinf_len > buf_size) { 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; 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 (rtw_get_wapi_ie(pnetwork->network.IEs, pnetwork->network.IELength, NULL, &wapi_len) > 0) {
if (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; 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 security_priv *psecuritypriv = &(padapter->securitypriv);
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
RTW_INFO("%s\n", __FUNCTION__); RTW_INFO("%s\n", __func__);
param->u.crypt.err = 0; param->u.crypt.err = 0;
param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0'; param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0';
@ -1596,8 +1596,8 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
_rtw_memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); _rtw_memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8);
_rtw_memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); _rtw_memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8);
padapter->securitypriv.binstallGrpkey = _TRUE; padapter->securitypriv.binstallGrpkey = _TRUE;
if (param->u.crypt.idx < 4) if (param->u.crypt.idx < 4)
_rtw_memcpy(padapter->securitypriv.iv_seq[param->u.crypt.idx], param->u.crypt.seq, 8); _rtw_memcpy(padapter->securitypriv.iv_seq[param->u.crypt.idx], param->u.crypt.seq, 8);
padapter->securitypriv.dot118021XGrpKeyid = param->u.crypt.idx; padapter->securitypriv.dot118021XGrpKeyid = param->u.crypt.idx;
rtw_set_key(padapter, &padapter->securitypriv, param->u.crypt.idx, 1, _TRUE); rtw_set_key(padapter, &padapter->securitypriv, param->u.crypt.idx, 1, _TRUE);
@ -1842,7 +1842,7 @@ static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
|| (MLME_IS_STA(adapter) && !pairwise) || (MLME_IS_STA(adapter) && !pairwise)
#endif #endif
) { ) {
/* WEP key, TX GTK/IGTK, RX GTK/IGTK(for STA mode) */ /* WEP key, TX GTK/IGTK, RX GTK/IGTK(for STA mode) */
if (is_wep_enc(sec->dot118021XGrpPrivacy)) { if (is_wep_enc(sec->dot118021XGrpPrivacy)) {
if (keyid >= WEP_KEYS) if (keyid >= WEP_KEYS)
@ -1931,7 +1931,7 @@ static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
} }
ret = 0; ret = 0;
exit: exit:
RTW_INFO(FUNC_NDEV_FMT RTW_INFO(FUNC_NDEV_FMT
GET_KEY_PARAM_FMT_S GET_KEY_PARAM_FMT_S
@ -2458,7 +2458,7 @@ void rtw_cfg80211_indicate_scan_done(_adapter *adapter, bool aborted)
_enter_critical_bh(&pwdev_priv->scan_req_lock, &irqL); _enter_critical_bh(&pwdev_priv->scan_req_lock, &irqL);
if (pwdev_priv->scan_request != NULL) { if (pwdev_priv->scan_request != NULL) {
#ifdef CONFIG_DEBUG_CFG80211 #ifdef CONFIG_DEBUG_CFG80211
RTW_INFO("%s with scan req\n", __FUNCTION__); RTW_INFO("%s with scan req\n", __func__);
#endif #endif
/* avoid WARN_ON(request != wiphy_to_dev(request->wiphy)->scan_req); */ /* 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; pwdev_priv->scan_request = NULL;
} else { } else {
#ifdef CONFIG_DEBUG_CFG80211 #ifdef CONFIG_DEBUG_CFG80211
RTW_INFO("%s without scan req\n", __FUNCTION__); RTW_INFO("%s without scan req\n", __func__);
#endif #endif
} }
_exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL); _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); pmlmepriv->wps_probe_req_ie = rtw_malloc(wps_ielen);
if (pmlmepriv->wps_probe_req_ie == NULL) { 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; 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); pmlmepriv->p2p_probe_req_ie = rtw_malloc(p2p_ielen);
if (pmlmepriv->p2p_probe_req_ie == NULL) { 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; return -EINVAL;
} }
@ -3311,7 +3311,7 @@ static int rtw_cfg80211_set_wpa_ie(_adapter *padapter, u8 *pie, size_t ielen)
goto exit; goto exit;
} }
_rtw_memcpy(buf, pie , ielen); _rtw_memcpy(buf, pie, ielen);
RTW_INFO("set wpa_ie(length:%zu):\n", ielen); RTW_INFO("set wpa_ie(length:%zu):\n", ielen);
RTW_INFO_DUMP(NULL, buf, ielen); RTW_INFO_DUMP(NULL, buf, ielen);
@ -3934,7 +3934,7 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy,
_adapter *padapter = wiphy_to_adapter(wiphy); _adapter *padapter = wiphy_to_adapter(wiphy);
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
int value; int value;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) || defined(COMPAT_KERNEL_RELEASE) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)) || defined(COMPAT_KERNEL_RELEASE)
value = mbm/100; value = mbm/100;
#else #else
value = dbm; value = dbm;
@ -4215,7 +4215,7 @@ void rtw_cfg80211_indicate_sta_disassoc(_adapter *padapter, const u8 *da, unsign
frame_len = sizeof(struct rtw_ieee80211_hdr_3addr); frame_len = sizeof(struct rtw_ieee80211_hdr_3addr);
reason = cpu_to_le16(reason); reason = cpu_to_le16(reason);
pmgmt_frame = rtw_set_fixed_ie(pmgmt_frame, _RSON_CODE_ , (unsigned char *)&reason, &frame_len); pmgmt_frame = rtw_set_fixed_ie(pmgmt_frame, _RSON_CODE_, (unsigned char *)&reason, &frame_len);
#ifdef COMPAT_KERNEL_RELEASE #ifdef COMPAT_KERNEL_RELEASE
rtw_cfg80211_rx_mgmt(wdev, freq, 0, mgmt_buf, frame_len, GFP_ATOMIC); rtw_cfg80211_rx_mgmt(wdev, freq, 0, mgmt_buf, frame_len, GFP_ATOMIC);
@ -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)) if (unlikely(skb->len < rtap_len))
goto fail; goto fail;
if (rtap_len != 14) {
RTW_INFO("radiotap len (should be 14): %d\n", rtap_len);
goto fail;
}
/* Skip the ratio tap header */ /* Skip the ratio tap header */
skb_pull(skb, rtap_len); 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; 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)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
&& (params->sta_modify_mask & STATION_PARAM_APPLY_PLINK_STATE) && (params->sta_modify_mask & STATION_PARAM_APPLY_PLINK_STATE)
#endif #endif
@ -5526,7 +5520,7 @@ static int cfg80211_rtw_dump_station(struct wiphy *wiphy, struct net_device *nde
else else
_rtw_memcpy(mac, plink->addr, ETH_ALEN); _rtw_memcpy(mac, plink->addr, ETH_ALEN);
#endif #endif
sinfo->filled = 0; sinfo->filled = 0;
if (psta) { if (psta) {
@ -5745,7 +5739,7 @@ void rtw_cfg80211_rx_probe_request(_adapter *adapter, union recv_frame *rframe)
, ch, sch, MAC_ARG(get_addr2_ptr(frame))); , ch, sch, MAC_ARG(get_addr2_ptr(frame)));
#endif #endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
rtw_cfg80211_rx_mgmt(wdev, freq, 0, frame, frame_len, GFP_ATOMIC); rtw_cfg80211_rx_mgmt(wdev, freq, 0, frame, frame_len, GFP_ATOMIC);
#else #else
cfg80211_rx_action(adapter->pnetdev, freq, frame, frame_len, GFP_ATOMIC); cfg80211_rx_action(adapter->pnetdev, freq, frame, frame_len, GFP_ATOMIC);
@ -6168,7 +6162,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
RTW_INFO("%s, ack to\n", __func__); RTW_INFO("%s, ack to\n", __func__);
#if 0 #if 0
if(wps_devicepassword_id == WPS_DPID_REGISTRAR_SPEC) { if (wps_devicepassword_id == WPS_DPID_REGISTRAR_SPEC) {
RTW_INFO("waiting for p2p peer key-in PIN CODE\n"); RTW_INFO("waiting for p2p peer key-in PIN CODE\n");
rtw_msleep_os(15000); /* 15 sec for key in PIN CODE, workaround for GS2 before issuing Nego Req. */ rtw_msleep_os(15000); /* 15 sec for key in PIN CODE, workaround for GS2 before issuing Nego Req. */
} }
@ -6341,7 +6335,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy,
padapter->wdinfo.listen_channel = remain_ch; padapter->wdinfo.listen_channel = remain_ch;
RTW_INFO(FUNC_ADPT_FMT" init listen_channel %u\n" RTW_INFO(FUNC_ADPT_FMT" init listen_channel %u\n"
, FUNC_ADPT_ARG(padapter), padapter->wdinfo.listen_channel); , FUNC_ADPT_ARG(padapter), padapter->wdinfo.listen_channel);
} else if (rtw_p2p_chk_state(pwdinfo , P2P_STATE_LISTEN) } else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_LISTEN)
&& (time_after_eq(rtw_get_current_time(), pwdev_priv->probe_resp_ie_update_time) && (time_after_eq(rtw_get_current_time(), pwdev_priv->probe_resp_ie_update_time)
&& rtw_get_passing_time_ms(pwdev_priv->probe_resp_ie_update_time) < 50) && rtw_get_passing_time_ms(pwdev_priv->probe_resp_ie_update_time) < 50)
) { ) {
@ -7193,7 +7187,7 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy,
/* Debug purpose */ /* Debug purpose */
#if 1 #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", RTW_INFO("peer:"MAC_FMT", action code:%d, dialog:%d, status code:%d\n",
MAC_ARG(txmgmt.peer), txmgmt.action_code, MAC_ARG(txmgmt.peer), txmgmt.action_code,
txmgmt.dialog_token, txmgmt.status_code); txmgmt.dialog_token, txmgmt.status_code);
@ -7474,7 +7468,7 @@ void dump_mesh_config(void *sel, const struct mesh_config *conf)
RTW_PRINT_SEL(sel, "path_refresh_time:%u\n", conf->path_refresh_time); RTW_PRINT_SEL(sel, "path_refresh_time:%u\n", conf->path_refresh_time);
RTW_PRINT_SEL(sel, "min_discovery_timeout:%u\n", conf->min_discovery_timeout); RTW_PRINT_SEL(sel, "min_discovery_timeout:%u\n", conf->min_discovery_timeout);
RTW_PRINT_SEL(sel, "dot11MeshHWMPactivePathTimeout:%u\n", conf->dot11MeshHWMPactivePathTimeout); RTW_PRINT_SEL(sel, "dot11MeshHWMPactivePathTimeout:%u\n", conf->dot11MeshHWMPactivePathTimeout);
RTW_PRINT_SEL(sel, "dot11MeshHWMPpreqMinInterval:%u\n", conf->dot11MeshHWMPpreqMinInterval); RTW_PRINT_SEL(sel, "dot11MeshHWMPpreqMinInterval:%u\n", conf->dot11MeshHWMPpreqMinInterval);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0))
RTW_PRINT_SEL(sel, "dot11MeshHWMPperrMinInterval:%u\n", conf->dot11MeshHWMPperrMinInterval); RTW_PRINT_SEL(sel, "dot11MeshHWMPperrMinInterval:%u\n", conf->dot11MeshHWMPperrMinInterval);
#endif #endif
@ -7489,11 +7483,11 @@ void dump_mesh_config(void *sel, const struct mesh_config *conf)
RTW_PRINT_SEL(sel, "dot11MeshForwarding:%d\n", conf->dot11MeshForwarding); RTW_PRINT_SEL(sel, "dot11MeshForwarding:%d\n", conf->dot11MeshForwarding);
RTW_PRINT_SEL(sel, "rssi_threshold:%d\n", conf->rssi_threshold); RTW_PRINT_SEL(sel, "rssi_threshold:%d\n", conf->rssi_threshold);
#endif #endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0))
RTW_PRINT_SEL(sel, "ht_opmode:0x%04x\n", conf->ht_opmode); RTW_PRINT_SEL(sel, "ht_opmode:0x%04x\n", conf->ht_opmode);
#endif #endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
RTW_PRINT_SEL(sel, "dot11MeshHWMPactivePathToRootTimeout:%u\n", conf->dot11MeshHWMPactivePathToRootTimeout); RTW_PRINT_SEL(sel, "dot11MeshHWMPactivePathToRootTimeout:%u\n", conf->dot11MeshHWMPactivePathToRootTimeout);
RTW_PRINT_SEL(sel, "dot11MeshHWMProotInterval:%u\n", conf->dot11MeshHWMProotInterval); RTW_PRINT_SEL(sel, "dot11MeshHWMProotInterval:%u\n", conf->dot11MeshHWMProotInterval);
@ -7504,7 +7498,7 @@ void dump_mesh_config(void *sel, const struct mesh_config *conf)
RTW_PRINT_SEL(sel, "power_mode:%s\n", nl80211_mesh_power_mode_str(conf->power_mode)); RTW_PRINT_SEL(sel, "power_mode:%s\n", nl80211_mesh_power_mode_str(conf->power_mode));
RTW_PRINT_SEL(sel, "dot11MeshAwakeWindowDuration:%u\n", conf->dot11MeshAwakeWindowDuration); RTW_PRINT_SEL(sel, "dot11MeshAwakeWindowDuration:%u\n", conf->dot11MeshAwakeWindowDuration);
#endif #endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0))
RTW_PRINT_SEL(sel, "plink_timeout:%u\n", conf->plink_timeout); RTW_PRINT_SEL(sel, "plink_timeout:%u\n", conf->plink_timeout);
#endif #endif
@ -7640,14 +7634,14 @@ static void rtw_cfg80211_mesh_cfg_set(_adapter *adapter, const struct mesh_confi
if (chk_mesh_attr(NL80211_MESHCONF_HT_OPMODE, mask)); if (chk_mesh_attr(NL80211_MESHCONF_HT_OPMODE, mask));
#endif #endif
#endif #endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
if (chk_mesh_attr(NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, mask)) if (chk_mesh_attr(NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, mask))
mcfg->dot11MeshHWMPactivePathToRootTimeout = conf->dot11MeshHWMPactivePathToRootTimeout; mcfg->dot11MeshHWMPactivePathToRootTimeout = conf->dot11MeshHWMPactivePathToRootTimeout;
if (chk_mesh_attr(NL80211_MESHCONF_HWMP_ROOT_INTERVAL, mask)) if (chk_mesh_attr(NL80211_MESHCONF_HWMP_ROOT_INTERVAL, mask))
mcfg->dot11MeshHWMProotInterval = conf->dot11MeshHWMProotInterval; mcfg->dot11MeshHWMProotInterval = conf->dot11MeshHWMProotInterval;
if (chk_mesh_attr(NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, mask)) if (chk_mesh_attr(NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, mask))
mcfg->dot11MeshHWMPconfirmationInterval = conf->dot11MeshHWMPconfirmationInterval; mcfg->dot11MeshHWMPconfirmationInterval = conf->dot11MeshHWMPconfirmationInterval;
#endif #endif
#if 0 /* TBD */ #if 0 /* TBD */
@ -7705,7 +7699,7 @@ u8 *rtw_cfg80211_construct_mesh_beacon_ies(struct wiphy *wiphy, _adapter *adapte
#endif #endif
if (!ch) if (!ch)
goto exit; goto exit;
#if defined(CONFIG_80211AC_VHT) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) #if defined(CONFIG_80211AC_VHT) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
vht = ht && ch > 14 && bw >= CHANNEL_WIDTH_80; /* VHT40/VHT20? */ vht = ht && ch > 14 && bw >= CHANNEL_WIDTH_80; /* VHT40/VHT20? */
#endif #endif
@ -7745,7 +7739,7 @@ u8 *rtw_cfg80211_construct_mesh_beacon_ies(struct wiphy *wiphy, _adapter *adapte
c = ies + 8; c = ies + 8;
/* beacon interval */ /* beacon interval */
RTW_PUT_LE16(c , setup->beacon_interval); RTW_PUT_LE16(c, setup->beacon_interval);
c += 2; c += 2;
/* capability */ /* capability */
@ -8030,7 +8024,7 @@ static int cfg80211_rtw_join_mesh(struct wiphy *wiphy, struct net_device *dev,
ret = -EINVAL; ret = -EINVAL;
goto exit; goto exit;
} }
rtw_mesh_work(&adapter->mesh_work); rtw_mesh_work(&adapter->mesh_work);
exit: exit:
@ -8111,7 +8105,7 @@ static int cfg80211_rtw_del_mpath(struct wiphy *wiphy, struct net_device *dev
} }
} else { } else {
rtw_mesh_path_flush_by_iface(adapter); rtw_mesh_path_flush_by_iface(adapter);
} }
exit: exit:
return ret; return ret;
@ -8331,14 +8325,14 @@ static int cfg80211_rtw_sched_scan_start(struct wiphy *wiphy,
interval = request->interval; interval = request->interval;
n_ssids = request->n_match_sets; n_ssids = request->n_match_sets;
ssids = (struct cfg80211_ssid *)rtw_zmalloc(n_ssids * sizeof(struct cfg80211_ssid)); ssids = (struct cfg80211_ssid *)rtw_zmalloc(n_ssids * sizeof(struct cfg80211_ssid));
if(ssids == NULL) { if (ssids == NULL) {
RTW_ERR("Fail to allocate ssids for PNO\n"); RTW_ERR("Fail to allocate ssids for PNO\n");
return -ENOMEM; return -ENOMEM;
} }
for (i=0;i<request->n_match_sets;i++) { for (i = 0; i < request -> n_match_sets; i++) {
ssids[i].ssid_len = request->match_sets[i].ssid.ssid_len; ssids[i].ssid_len = request->match_sets[i].ssid.ssid_len;
memcpy(ssids[i].ssid, request->match_sets[i].ssid.ssid, memcpy(ssids[i].ssid, request->match_sets[i].ssid.ssid,
request->match_sets[i].ssid.ssid_len); request->match_sets[i].ssid.ssid_len);
} }
#else #else
interval = request->interval; interval = request->interval;
@ -8368,8 +8362,8 @@ static int cfg80211_rtw_sched_scan_stop(struct wiphy *wiphy,
} }
int cfg80211_rtw_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow) { int cfg80211_rtw_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow) {
RTW_DBG("==> %s\n",__func__); RTW_DBG("==> %s\n", __func__);
RTW_DBG("<== %s\n",__func__); RTW_DBG("<== %s\n", __func__);
return 0; return 0;
} }
@ -8379,13 +8373,14 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) {
struct pwrctrl_priv *pwrpriv; struct pwrctrl_priv *pwrpriv;
struct mlme_priv *pmlmepriv; struct mlme_priv *pmlmepriv;
padapter = wiphy_to_adapter(wiphy); padapter = wiphy_to_adapter(wiphy);
pwrpriv = adapter_to_pwrctl(padapter); pwrpriv = adapter_to_pwrctl(padapter);
pmlmepriv = &padapter->mlmepriv; pmlmepriv = &padapter->mlmepriv;
struct sitesurvey_parm parm; struct sitesurvey_parm parm;
int i, len; int i, len;
RTW_DBG("==> %s\n",__func__); RTW_DBG("==> %s\n", __func__);
if (pwrpriv->wowlan_last_wake_reason == RX_PNO) { if (pwrpriv->wowlan_last_wake_reason == RX_PNO) {
struct rtw_wdev_priv *pwdev_priv = adapter_wdev_data(padapter); struct rtw_wdev_priv *pwdev_priv = adapter_wdev_data(padapter);
@ -8395,7 +8390,7 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) {
rtw_cfg80211_disconnected(padapter->rtw_wdev, 0, NULL, 0, 1, GFP_ATOMIC); rtw_cfg80211_disconnected(padapter->rtw_wdev, 0, NULL, 0, 1, GFP_ATOMIC);
rtw_init_sitesurvey_parm(padapter, &parm); rtw_init_sitesurvey_parm(padapter, &parm);
for (i=0;i<pwrpriv->pnlo_info->ssid_num && i < RTW_SSID_SCAN_AMOUNT; i++) { for (i = 0; i < pwrpriv -> pnlo_info -> ssid_num && i < RTW_SSID_SCAN_AMOUNT; i++) {
len = pwrpriv->pno_ssid_list->node[i].SSID_len; len = pwrpriv->pno_ssid_list->node[i].SSID_len;
_rtw_memcpy(&parm.ssid[i].Ssid, pwrpriv->pno_ssid_list->node[i].SSID, len); _rtw_memcpy(&parm.ssid[i].Ssid, pwrpriv->pno_ssid_list->node[i].SSID, len);
parm->ssid[i].SsidLength = len; parm->ssid[i].SsidLength = len;
@ -8407,21 +8402,23 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) {
//rtw_sitesurvey_cmd(padapter, NULL); //rtw_sitesurvey_cmd(padapter, NULL);
rtw_sitesurvey_cmd(padapter, &parm); rtw_sitesurvey_cmd(padapter, &parm);
_exit_critical_bh(&pmlmepriv->lock, &irqL); _exit_critical_bh(&pmlmepriv->lock, &irqL);
for (PNOWakeupScanWaitCnt = 0; PNOWakeupScanWaitCnt < 10; PNOWakeupScanWaitCnt++) { for (PNOWakeupScanWaitCnt = 0; PNOWakeupScanWaitCnt < 10; PNOWakeupScanWaitCnt++) {
if(check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _FALSE) if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _FALSE)
break; break;
rtw_msleep_os(1000); rtw_msleep_os(1000);
} }
_enter_critical_bh(&pmlmepriv->lock, &irqL); _enter_critical_bh(&pmlmepriv->lock, &irqL);
cfg80211_sched_scan_results(padapter->rtw_wdev->wiphy); cfg80211_sched_scan_results(padapter->rtw_wdev->wiphy);
_exit_critical_bh(&pmlmepriv->lock, &irqL); _exit_critical_bh(&pmlmepriv->lock, &irqL);
} }
RTW_DBG("<== %s\n",__func__);
RTW_DBG("<== %s\n", __func__);
return 0; return 0;
} }
#endif /* CONFIG_PNO_SUPPORT */ #endif /* CONFIG_PNO_SUPPORT */
@ -8457,13 +8454,13 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
pmlmepriv->wps_beacon_ie = rtw_malloc(wps_ielen); pmlmepriv->wps_beacon_ie = rtw_malloc(wps_ielen);
if (pmlmepriv->wps_beacon_ie == NULL) { 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; return -EINVAL;
} }
_rtw_memcpy(pmlmepriv->wps_beacon_ie, wps_ie, wps_ielen); _rtw_memcpy(pmlmepriv -> wps_beacon_ie, wps_ie, wps_ielen);
pmlmepriv->wps_beacon_ie_len = wps_ielen; pmlmepriv -> wps_beacon_ie_len = wps_ielen;
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, _TRUE); update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, _TRUE);
@ -8480,15 +8477,15 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
#endif #endif
if (pmlmepriv->p2p_beacon_ie) { if (pmlmepriv->p2p_beacon_ie) {
u32 free_len = pmlmepriv->p2p_beacon_ie_len; u32 free_len = pmlmepriv -> p2p_beacon_ie_len;
pmlmepriv->p2p_beacon_ie_len = 0; pmlmepriv -> p2p_beacon_ie_len = 0;
rtw_mfree(pmlmepriv->p2p_beacon_ie, free_len); rtw_mfree(pmlmepriv -> p2p_beacon_ie, free_len);
pmlmepriv->p2p_beacon_ie = NULL; pmlmepriv -> p2p_beacon_ie = NULL;
} }
pmlmepriv->p2p_beacon_ie = rtw_malloc(p2p_ielen); pmlmepriv -> p2p_beacon_ie = rtw_malloc(p2p_ielen);
if (pmlmepriv->p2p_beacon_ie == NULL) { 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; return -EINVAL;
} }
@ -8567,13 +8564,13 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
pmlmepriv->wps_probe_resp_ie = rtw_malloc(wps_ielen); pmlmepriv->wps_probe_resp_ie = rtw_malloc(wps_ielen);
if (pmlmepriv->wps_probe_resp_ie == NULL) { 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; return -EINVAL;
} }
/* add PUSH_BUTTON config_method by driver self in wpsie of probe_resp at GO Mode */ /* add PUSH_BUTTON config_method by driver self in wpsie of probe_resp at GO Mode */
puconfig_method = (u16 *)rtw_get_wps_attr_content(wps_ie, wps_ielen, WPS_ATTR_CONF_METHOD , NULL, &attr_contentlen); puconfig_method = (u16 *)rtw_get_wps_attr_content(wps_ie, wps_ielen, WPS_ATTR_CONF_METHOD, NULL, &attr_contentlen);
if (puconfig_method != NULL) { if (puconfig_method != NULL) {
/* struct registry_priv *pregistrypriv = &padapter->registrypriv; */ /* struct registry_priv *pregistrypriv = &padapter->registrypriv; */
struct wireless_dev *wdev = padapter->rtw_wdev; struct wireless_dev *wdev = padapter->rtw_wdev;
@ -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); pmlmepriv->p2p_probe_resp_ie = rtw_malloc(p2p_ielen);
if (pmlmepriv->p2p_probe_resp_ie == NULL) { 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; 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; pmlmepriv->p2p_go_probe_resp_ie_len = 0;
rtw_mfree(pmlmepriv->p2p_go_probe_resp_ie, free_len); rtw_mfree(pmlmepriv->p2p_go_probe_resp_ie, free_len);
pmlmepriv->p2p_go_probe_resp_ie = NULL; pmlmepriv->p2p_go_probe_resp_ie = NULL;
} }
pmlmepriv->p2p_go_probe_resp_ie = rtw_malloc(p2p_ielen); pmlmepriv->p2p_go_probe_resp_ie = rtw_malloc(p2p_ielen);
if (pmlmepriv->p2p_go_probe_resp_ie == NULL) { 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; 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); pmlmepriv->wps_assoc_resp_ie = rtw_malloc(ie_len);
if (pmlmepriv->wps_assoc_resp_ie == NULL) { 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; return -EINVAL;
} }
_rtw_memcpy(pmlmepriv->wps_assoc_resp_ie, ie, ie_len); _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); pmlmepriv->p2p_assoc_resp_ie = rtw_malloc(ie_len);
if (pmlmepriv->p2p_assoc_resp_ie == NULL) { 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; return -EINVAL;
} }
_rtw_memcpy(pmlmepriv->p2p_assoc_resp_ie, ie, ie_len); _rtw_memcpy(pmlmepriv->p2p_assoc_resp_ie, ie, ie_len);
@ -8924,19 +8922,19 @@ static void rtw_cfg80211_init_vht_capab(_adapter *padapter
static void rtw_cfg80211_create_vht_cap(struct ieee80211_sta_vht_cap *vht_cap) static void rtw_cfg80211_create_vht_cap(struct ieee80211_sta_vht_cap *vht_cap)
{ {
u16 mcs_map; u16 mcs_map;
int i; int i;
vht_cap->vht_supported = 1; vht_cap->vht_supported = 1;
vht_cap->cap = IEEE80211_VHT_CAP_RXLDPC; vht_cap->cap = IEEE80211_VHT_CAP_RXLDPC;
mcs_map = 0; mcs_map = 0;
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << (i*2); mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << (i*2);
} }
vht_cap->vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map); vht_cap->vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map);
vht_cap->vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map); vht_cap->vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map);
} }
void rtw_cfg80211_init_wdev_data(_adapter *padapter) void rtw_cfg80211_init_wdev_data(_adapter *padapter)
@ -9335,7 +9333,7 @@ int rtw_hostapd_acs_dump_survey(struct wiphy *wiphy, struct net_device *netdev,
#elif defined(CONFIG_RTW_ACS) && defined(CONFIG_BACKGROUND_NOISE_MONITOR) #elif defined(CONFIG_RTW_ACS) && defined(CONFIG_BACKGROUND_NOISE_MONITOR)
rtw_cfg80211_set_survey_info_with_clm(padapter, idx, info); rtw_cfg80211_set_survey_info_with_clm(padapter, idx, info);
#else #else
RTW_ERR("%s: unknown acs operation!\n", __func__); RTW_ERR("%s: unknown acs operation!\n", __func__);
#endif #endif
return ret; return ret;

View File

@ -127,7 +127,7 @@ int rtw_os_alloc_recvframe(_adapter *padapter, union recv_frame *precvframe, u8
res = _FAIL; res = _FAIL;
#else #else
if ((pattrib->mfrag == 1) && (pattrib->frag_num == 0)) { 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); */ /* rtw_free_recvframe(precvframe, pfree_recv_queue); */
res = _FAIL; res = _FAIL;
goto exit_rtw_os_recv_resource_alloc; 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_head = precvframe->u.hdr.rx_data = precvframe->u.hdr.rx_tail = pdata;
precvframe->u.hdr.rx_end = pdata + alloc_sz; precvframe->u.hdr.rx_end = pdata + alloc_sz;
} else { } 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); */ /* rtw_free_recvframe(precvframe, pfree_recv_queue); */
/*exit_rtw_os_recv_resource_alloc;*/ /*exit_rtw_os_recv_resource_alloc;*/
res = _FAIL; res = _FAIL;
@ -281,7 +281,7 @@ int rtw_os_recvbuf_resource_free(_adapter *padapter, struct recv_buf *precvbuf)
} }
_pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, const u8 *da, const u8 *sa, u8 *msdu ,u16 msdu_len) _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, const u8 *da, const u8 *sa, u8 *msdu, u16 msdu_len)
{ {
u16 eth_type; u16 eth_type;
u8 *data_ptr; u8 *data_ptr;
@ -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; sub_skb->len = msdu_len;
skb_set_tail_pointer(sub_skb, msdu_len); skb_set_tail_pointer(sub_skb, msdu_len);
} else { } else {
RTW_INFO("%s(): rtw_skb_clone() Fail!!!\n", __FUNCTION__); RTW_INFO("%s(): rtw_skb_clone() Fail!!!\n", __func__);
return NULL; return NULL;
} }
} }
@ -399,7 +399,7 @@ void dynamic_napi_th_chk (_adapter *adapter)
if (adapter->registrypriv.en_napi) { if (adapter->registrypriv.en_napi) {
struct dvobj_priv *dvobj; struct dvobj_priv *dvobj;
struct registry_priv *registry; struct registry_priv *registry;
dvobj = adapter_to_dvobj(adapter); dvobj = adapter_to_dvobj(adapter);
registry = &adapter->registrypriv; registry = &adapter->registrypriv;
if (dvobj->traffic_stat.cur_rx_tp > registry->napi_threshold) if (dvobj->traffic_stat.cur_rx_tp > registry->napi_threshold)
@ -422,7 +422,7 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, union recv_frame *r
#endif #endif
int ret; int ret;
/* Indicat the packets to upper layer */ /* Indicate the packets to upper layer */
if (pkt) { if (pkt) {
struct ethhdr *ehdr = (struct ethhdr *)pkt->data; struct ethhdr *ehdr = (struct ethhdr *)pkt->data;
@ -510,7 +510,7 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, union recv_frame *r
#ifdef CONFIG_RTW_NAPI #ifdef CONFIG_RTW_NAPI
#ifdef CONFIG_RTW_NAPI_DYNAMIC #ifdef CONFIG_RTW_NAPI_DYNAMIC
if (!skb_queue_empty(&precvpriv->rx_napi_skb_queue) if (!skb_queue_empty(&precvpriv->rx_napi_skb_queue)
&& !adapter_to_dvobj(padapter)->en_napi_dynamic && !adapter_to_dvobj(padapter)->en_napi_dynamic
) )
napi_recv(padapter, RTL_NAPI_WEIGHT); napi_recv(padapter, RTL_NAPI_WEIGHT);
#endif #endif
@ -604,13 +604,13 @@ void rtw_hostapd_mlme_rx(_adapter *padapter, union recv_frame *precv_frame)
skb->len = precv_frame->u.hdr.len; skb->len = precv_frame->u.hdr.len;
/* pskb_copy = rtw_skb_copy(skb); /* pskb_copy = rtw_skb_copy(skb);
* if(skb == NULL) goto _exit; */ if(skb == NULL) goto _exit; */
skb->dev = pmgnt_netdev; skb->dev = pmgnt_netdev;
skb->ip_summed = CHECKSUM_NONE; skb->ip_summed = CHECKSUM_NONE;
skb->pkt_type = PACKET_OTHERHOST; skb->pkt_type = PACKET_OTHERHOST;
/* skb->protocol = __constant_htons(0x0019); ETH_P_80211_RAW */ /* 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); */ /* 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. * more details.
* *
*****************************************************************************/ *****************************************************************************/
#define _HCI_INTF_C_ #define _HCI_INTF_C_
#include <drv_types.h> #include <drv_types.h>
@ -65,12 +66,12 @@ static void rtw_dev_shutdown(struct device *dev)
#ifdef CONFIG_WOWLAN #ifdef CONFIG_WOWLAN
#ifdef CONFIG_GPIO_WAKEUP #ifdef CONFIG_GPIO_WAKEUP
/*default wake up pin change to BT*/ /*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); rtw_hal_switch_gpio_wl_ctrl(adapter, WAKEUP_GPIO_IDX, _FALSE);
#endif /* CONFIG_GPIO_WAKEUP */ #endif /* CONFIG_GPIO_WAKEUP */
if (pwrctl->wowlan_mode == _TRUE) 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 else
#endif #endif
{ {
@ -875,7 +876,7 @@ int rtw_hw_suspend(_adapter *padapter)
return 0; return 0;
error_exit: error_exit:
RTW_INFO("%s, failed\n", __FUNCTION__); RTW_INFO("%s, failed\n", __func__);
return -1; return -1;
} }
@ -910,7 +911,7 @@ int rtw_hw_resume(_adapter *padapter)
return 0; return 0;
error_exit: error_exit:
RTW_INFO("%s, Open net dev failed\n", __FUNCTION__); RTW_INFO("%s, Open net dev failed\n", __func__);
return -1; return -1;
} }
#endif #endif
@ -930,7 +931,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
padapter = dvobj_get_primary_adapter(dvobj); padapter = dvobj_get_primary_adapter(dvobj);
if (pwrpriv->bInSuspend == _TRUE) { 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++; pdbgpriv->dbg_suspend_error_cnt++;
goto exit; goto exit;
} }
@ -966,7 +967,7 @@ int rtw_resume_process(_adapter *padapter)
if (pwrpriv->bInSuspend == _FALSE) { if (pwrpriv->bInSuspend == _FALSE) {
pdbgpriv->dbg_resume_error_cnt++; 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; return -1;
} }
@ -1043,7 +1044,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
padapter = dvobj_get_primary_adapter(dvobj); padapter = dvobj_get_primary_adapter(dvobj);
pmlmeext = &padapter->mlmeextpriv; 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++; pdbgpriv->dbg_resume_cnt++;
#ifdef CONFIG_AUTOSUSPEND #ifdef CONFIG_AUTOSUSPEND
@ -1073,7 +1074,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
} }
pmlmeext->last_scan_time = rtw_get_current_time(); 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; 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