mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
Merge branch 'v5.2.2.4' of http://github.com/lwfinger/rtl8188eu into v5.2.2.4
This commit is contained in:
commit
bbc8dd8720
33 changed files with 556 additions and 743 deletions
|
@ -187,35 +187,35 @@ static struct ieee80211_channel rtw_5ghz_a_channels[] = {
|
|||
};
|
||||
|
||||
|
||||
void rtw_2g_channels_init(struct ieee80211_channel *channels)
|
||||
static void rtw_2g_channels_init(struct ieee80211_channel *channels)
|
||||
{
|
||||
_rtw_memcpy((void *)channels, (void *)rtw_2ghz_channels,
|
||||
sizeof(struct ieee80211_channel) * RTW_2G_CHANNELS_NUM
|
||||
);
|
||||
}
|
||||
|
||||
void rtw_5g_channels_init(struct ieee80211_channel *channels)
|
||||
static void rtw_5g_channels_init(struct ieee80211_channel *channels)
|
||||
{
|
||||
_rtw_memcpy((void *)channels, (void *)rtw_5ghz_a_channels,
|
||||
sizeof(struct ieee80211_channel) * RTW_5G_CHANNELS_NUM
|
||||
);
|
||||
}
|
||||
|
||||
void rtw_2g_rates_init(struct ieee80211_rate *rates)
|
||||
static void rtw_2g_rates_init(struct ieee80211_rate *rates)
|
||||
{
|
||||
_rtw_memcpy(rates, rtw_g_rates,
|
||||
sizeof(struct ieee80211_rate) * RTW_G_RATES_NUM
|
||||
);
|
||||
}
|
||||
|
||||
void rtw_5g_rates_init(struct ieee80211_rate *rates)
|
||||
static void rtw_5g_rates_init(struct ieee80211_rate *rates)
|
||||
{
|
||||
_rtw_memcpy(rates, rtw_a_rates,
|
||||
sizeof(struct ieee80211_rate) * RTW_A_RATES_NUM
|
||||
);
|
||||
}
|
||||
|
||||
struct ieee80211_supported_band *rtw_spt_band_alloc(
|
||||
static struct ieee80211_supported_band *rtw_spt_band_alloc(
|
||||
enum nl80211_band band
|
||||
)
|
||||
{
|
||||
|
@ -260,7 +260,7 @@ exit:
|
|||
return spt_band;
|
||||
}
|
||||
|
||||
void rtw_spt_band_free(struct ieee80211_supported_band *spt_band)
|
||||
static void rtw_spt_band_free(struct ieee80211_supported_band *spt_band)
|
||||
{
|
||||
u32 size = 0;
|
||||
|
||||
|
@ -415,9 +415,8 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
|
|||
size_t buf_size = MAX_BSSINFO_LEN;
|
||||
size_t len, bssinf_len = 0;
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
unsigned short *fctrl;
|
||||
__le16 *fctrl;
|
||||
u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
|
||||
struct wireless_dev *wdev = padapter->rtw_wdev;
|
||||
struct wiphy *wiphy = wdev->wiphy;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
@ -453,13 +452,10 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
|
|||
freq = rtw_ch2freq(channel);
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
|
||||
if (0)
|
||||
notify_timestamp = le64_to_cpu(*(u64 *)rtw_get_timestampe_from_ie(pnetwork->network.IEs));
|
||||
else
|
||||
notify_timestamp = rtw_get_systime_us();
|
||||
notify_timestamp = rtw_get_systime_us();
|
||||
|
||||
notify_interval = le16_to_cpu(*(u16 *)rtw_get_beacon_interval_from_ie(pnetwork->network.IEs));
|
||||
notify_capability = le16_to_cpu(*(u16 *)rtw_get_capability_from_ie(pnetwork->network.IEs));
|
||||
notify_interval = le16_to_cpu(*(__le16 *)rtw_get_beacon_interval_from_ie(pnetwork->network.IEs));
|
||||
notify_capability = le16_to_cpu(*(__le16 *)rtw_get_capability_from_ie(pnetwork->network.IEs));
|
||||
|
||||
notify_ie = pnetwork->network.IEs + _FIXED_IE_LENGTH_;
|
||||
notify_ielen = pnetwork->network.IELength - _FIXED_IE_LENGTH_;
|
||||
|
@ -472,17 +468,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
|
|||
notify_signal = 100 * translate_percentage_to_dbm(pnetwork->network.PhyInfo.SignalStrength); /* dbm */
|
||||
}
|
||||
|
||||
#if 0
|
||||
RTW_INFO("bssid: "MAC_FMT"\n", MAC_ARG(pnetwork->network.MacAddress));
|
||||
RTW_INFO("Channel: %d(%d)\n", channel, freq);
|
||||
RTW_INFO("Capability: %X\n", notify_capability);
|
||||
RTW_INFO("Beacon interval: %d\n", notify_interval);
|
||||
RTW_INFO("Signal: %d\n", notify_signal);
|
||||
RTW_INFO("notify_timestamp: %llu\n", notify_timestamp);
|
||||
#endif
|
||||
|
||||
/* pbuf = buf; */
|
||||
|
||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pbuf;
|
||||
fctrl = &(pwlanhdr->frame_ctl);
|
||||
*(fctrl) = 0;
|
||||
|
@ -505,7 +491,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
|
|||
/* pbuf += sizeof(struct rtw_ieee80211_hdr_3addr); */
|
||||
len = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
_rtw_memcpy((pbuf + len), pnetwork->network.IEs, pnetwork->network.IELength);
|
||||
*((u64 *)(pbuf + len)) = cpu_to_le64(notify_timestamp);
|
||||
*((__le64 *)(pbuf + len)) = cpu_to_le64(notify_timestamp);
|
||||
|
||||
len += pnetwork->network.IELength;
|
||||
|
||||
|
@ -745,7 +731,7 @@ check_bss:
|
|||
struct ieee80211_channel *notify_channel;
|
||||
u32 freq;
|
||||
u16 channel = cur_network->network.Configuration.DSConfig;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
||||
struct cfg80211_roam_info roam_info = {};
|
||||
#endif
|
||||
|
||||
|
@ -754,7 +740,7 @@ check_bss:
|
|||
#endif
|
||||
|
||||
RTW_INFO(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
||||
roam_info.channel = notify_channel;
|
||||
roam_info.bssid = cur_network->network.MacAddress;
|
||||
roam_info.req_ie =
|
||||
|
@ -1268,7 +1254,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
|
|||
#ifdef CONFIG_RTW_80211R
|
||||
psta->ft_pairwise_key_installed = _TRUE;
|
||||
#endif
|
||||
/* DEBUG_ERR((" param->u.crypt.key_len=%d\n",param->u.crypt.key_len)); */
|
||||
/* DEBUG_ERR((" param->u.crypt.key_len=%d\n", param->u.crypt.key_len)); */
|
||||
RTW_INFO(" ~~~~set sta key:unicastkey\n");
|
||||
|
||||
rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, _TRUE);
|
||||
|
@ -2009,7 +1995,7 @@ void rtw_cfg80211_unlink_bss(_adapter *padapter, struct wlan_network *pnetwork)
|
|||
}
|
||||
|
||||
/* if target wps scan ongoing, target_ssid is filled */
|
||||
int rtw_cfg80211_is_target_wps_scan(struct cfg80211_scan_request *scan_req, struct cfg80211_ssid *target_ssid)
|
||||
static int rtw_cfg80211_is_target_wps_scan(struct cfg80211_scan_request *scan_req, struct cfg80211_ssid *target_ssid)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
@ -3687,9 +3673,9 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
|
|||
/* Check if this ia a Wireless Distribution System (WDS) frame
|
||||
* which has 4 MAC addresses
|
||||
*/
|
||||
if (dot11_hdr->frame_ctl & 0x0080)
|
||||
if (le16_to_cpu(dot11_hdr->frame_ctl) & 0x0080)
|
||||
qos_len = 2;
|
||||
if ((dot11_hdr->frame_ctl & 0x0300) == 0x0300)
|
||||
if ((le16_to_cpu(dot11_hdr->frame_ctl) & 0x0300) == 0x0300)
|
||||
dot11_hdr_len += 6;
|
||||
|
||||
memcpy(dst_mac_addr, dot11_hdr->addr1, sizeof(dst_mac_addr));
|
||||
|
@ -3848,7 +3834,7 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne
|
|||
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
||||
mon_ndev->name[IFNAMSIZ - 1] = 0;
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(4,11,9))
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(4, 11, 9))
|
||||
mon_ndev->needs_free_netdev = false;
|
||||
mon_ndev->priv_destructor = rtw_ndev_destructor;
|
||||
#else
|
||||
|
@ -3902,20 +3888,20 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
|
||||
static struct wireless_dev *
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
static struct net_device *
|
||||
#else
|
||||
static int
|
||||
#endif
|
||||
cfg80211_rtw_add_virtual_intf(struct wiphy *wiphy,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0))
|
||||
const char *name,
|
||||
#else
|
||||
char *name,
|
||||
#endif
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||
unsigned char name_assign_type,
|
||||
#endif
|
||||
enum nl80211_iftype type,
|
||||
|
@ -4422,7 +4408,7 @@ static int cfg80211_rtw_change_station(struct wiphy *wiphy, struct net_device *n
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct sta_info *rtw_sta_info_get_by_idx(const int idx, struct sta_priv *pstapriv)
|
||||
static struct sta_info *rtw_sta_info_get_by_idx(const int idx, struct sta_priv *pstapriv)
|
||||
|
||||
{
|
||||
|
||||
|
@ -4665,7 +4651,7 @@ void rtw_cfg80211_rx_probe_request(_adapter *adapter, union recv_frame *rframe)
|
|||
RTW_INFO("RTW_Rx: probe request, ch=%d(%d)\n", ch, sch);
|
||||
#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);
|
||||
#else
|
||||
cfg80211_rx_action(adapter->pnetdev, freq, frame, frame_len, GFP_ATOMIC);
|
||||
|
@ -4820,7 +4806,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
|||
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
|
||||
u8 action = P2P_PUB_ACTION_ACTION;
|
||||
u8 dialogToken = 1;
|
||||
u32 p2poui = cpu_to_be32(P2POUI);
|
||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||
u8 oui_subtype = P2P_PROVISION_DISC_REQ;
|
||||
u32 p2pielen = 0;
|
||||
#ifdef CONFIG_WFD
|
||||
|
@ -4831,15 +4817,14 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
|||
struct pkt_attrib *pattrib;
|
||||
unsigned char *pframe;
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
unsigned short *fctrl;
|
||||
__le16 *fctrl;
|
||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
u8 *frame_body = (unsigned char *)(buf + sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
size_t frame_body_len = len - sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
|
||||
__be16 be_tmp;
|
||||
|
||||
RTW_INFO("[%s] In\n", __FUNCTION__);
|
||||
|
||||
|
@ -4850,8 +4835,8 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
|||
pwdinfo->tx_prov_disc_info.wps_config_method_request = WPS_CM_PUSH_BUTTON;
|
||||
|
||||
rtw_get_wps_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, frame_body_len - _PUBLIC_ACTION_IE_OFFSET_, wpsie, &wpsielen);
|
||||
rtw_get_wps_attr_content(wpsie, wpsielen, WPS_ATTR_DEVICE_PWID, (u8 *) &wps_devicepassword_id, &wps_devicepassword_id_len);
|
||||
wps_devicepassword_id = be16_to_cpu(wps_devicepassword_id);
|
||||
rtw_get_wps_attr_content(wpsie, wpsielen, WPS_ATTR_DEVICE_PWID, (u8 *)&be_tmp, &wps_devicepassword_id_len);
|
||||
wps_devicepassword_id = be16_to_cpu(be_tmp);
|
||||
|
||||
switch (wps_devicepassword_id) {
|
||||
case WPS_DPID_PIN:
|
||||
|
@ -4874,15 +4859,11 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
if (rtw_get_p2p_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, frame_body_len - _PUBLIC_ACTION_IE_OFFSET_, p2p_ie, &p2p_ielen)) {
|
||||
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO, devinfo_content, &devinfo_contentlen);
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8 *)&capability, &capability_len);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* start to build provision_request frame */
|
||||
_rtw_memset(wpsie, 0, sizeof(wpsie));
|
||||
_rtw_memset(p2p_ie, 0, sizeof(p2p_ie));
|
||||
|
@ -4892,7 +4873,6 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
|||
if (pmgntframe == NULL)
|
||||
return;
|
||||
|
||||
|
||||
/* update attribute */
|
||||
pattrib = &pmgntframe->attrib;
|
||||
update_mgntframe_attrib(padapter, pattrib);
|
||||
|
@ -4976,16 +4956,16 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
|||
|
||||
wpsielen = 0;
|
||||
/* WPS OUI */
|
||||
*(u32 *)(wpsie) = cpu_to_be32(WPSOUI);
|
||||
*(__be32 *)(wpsie) = cpu_to_be32(WPSOUI);
|
||||
wpsielen += 4;
|
||||
|
||||
/* WPS version */
|
||||
/* Type: */
|
||||
*(u16 *)(wpsie + wpsielen) = cpu_to_be16(WPS_ATTR_VER1);
|
||||
*(__be16 *)(wpsie + wpsielen) = cpu_to_be16(WPS_ATTR_VER1);
|
||||
wpsielen += 2;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(wpsie + wpsielen) = cpu_to_be16(0x0001);
|
||||
*(__be16 *)(wpsie + wpsielen) = cpu_to_be16(0x0001);
|
||||
wpsielen += 2;
|
||||
|
||||
/* Value: */
|
||||
|
@ -4993,15 +4973,15 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
|||
|
||||
/* Config Method */
|
||||
/* Type: */
|
||||
*(u16 *)(wpsie + wpsielen) = cpu_to_be16(WPS_ATTR_CONF_METHOD);
|
||||
*(__be16 *)(wpsie + wpsielen) = cpu_to_be16(WPS_ATTR_CONF_METHOD);
|
||||
wpsielen += 2;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(wpsie + wpsielen) = cpu_to_be16(0x0002);
|
||||
*(__be16 *)(wpsie + wpsielen) = cpu_to_be16(0x0002);
|
||||
wpsielen += 2;
|
||||
|
||||
/* Value: */
|
||||
*(u16 *)(wpsie + wpsielen) = cpu_to_be16(pwdinfo->tx_prov_disc_info.wps_config_method_request);
|
||||
*(__be16 *)(wpsie + wpsielen) = cpu_to_be16(pwdinfo->tx_prov_disc_info.wps_config_method_request);
|
||||
wpsielen += 2;
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen);
|
||||
|
@ -6309,7 +6289,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
|
|||
wps_ie = rtw_get_wps_ie(buf, len, NULL, &wps_ielen);
|
||||
if (wps_ie) {
|
||||
uint attr_contentlen = 0;
|
||||
u16 uconfig_method, *puconfig_method = NULL;
|
||||
__be16 uconfig_method, *puconfig_method = NULL;
|
||||
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
RTW_INFO("probe_resp_wps_ielen=%d\n", wps_ielen);
|
||||
|
@ -6342,7 +6322,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
|
|||
}
|
||||
|
||||
/* 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 = (__be16 *)rtw_get_wps_attr_content(wps_ie, wps_ielen, WPS_ATTR_CONF_METHOD , NULL, &attr_contentlen);
|
||||
if (puconfig_method != NULL) {
|
||||
/* struct registry_priv *pregistrypriv = &padapter->registrypriv; */
|
||||
struct wireless_dev *wdev = padapter->rtw_wdev;
|
||||
|
@ -6354,8 +6334,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
|
|||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
/* for WIFI-DIRECT LOGO 4.2.2, AUTO GO can't set PUSH_BUTTON flags */
|
||||
if (wdev->iftype == NL80211_IFTYPE_P2P_GO) {
|
||||
uconfig_method = WPS_CM_PUSH_BUTTON;
|
||||
uconfig_method = cpu_to_be16(uconfig_method);
|
||||
uconfig_method = cpu_to_be16(WPS_CM_PUSH_BUTTON);
|
||||
|
||||
*puconfig_method &= ~uconfig_method;
|
||||
}
|
||||
|
@ -6376,16 +6355,17 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
|
|||
u8 is_GO = _FALSE;
|
||||
u32 attr_contentlen = 0;
|
||||
u16 cap_attr = 0;
|
||||
__le16 le_tmp;
|
||||
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
RTW_INFO("probe_resp_p2p_ielen=%d\n", p2p_ielen);
|
||||
#endif
|
||||
|
||||
/* Check P2P Capability ATTR */
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8 *)&cap_attr, (uint *) &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8 *)&le_tmp, (uint *)&attr_contentlen)) {
|
||||
u8 grp_cap = 0;
|
||||
/* RTW_INFO( "[%s] Got P2P Capability Attr!!\n", __FUNCTION__ ); */
|
||||
cap_attr = le16_to_cpu(cap_attr);
|
||||
cap_attr = le16_to_cpu(le_tmp);
|
||||
grp_cap = (u8)((cap_attr >> 8) & 0xff);
|
||||
|
||||
is_GO = (grp_cap & BIT(0)) ? _TRUE : _FALSE;
|
||||
|
@ -6647,12 +6627,17 @@ static void rtw_cfg80211_init_ht_capab(_adapter *padapter, struct ieee80211_sta_
|
|||
RTW_INFO("%s, error rf_type=%d\n", __func__, rf_type);
|
||||
};
|
||||
|
||||
ht_cap->mcs.rx_highest = rtw_mcs_rate(rf_type
|
||||
, hal_is_bw_support(padapter, CHANNEL_WIDTH_40)
|
||||
, hal_is_bw_support(padapter, CHANNEL_WIDTH_40) ? ht_cap->cap & IEEE80211_HT_CAP_SGI_40 : ht_cap->cap & IEEE80211_HT_CAP_SGI_20
|
||||
, ht_cap->mcs.rx_mask
|
||||
);
|
||||
ht_cap->mcs.rx_highest =
|
||||
cpu_to_le16(rtw_mcs_rate(rf_type,
|
||||
hal_is_bw_support(padapter,
|
||||
CHANNEL_WIDTH_40),
|
||||
hal_is_bw_support(padapter,
|
||||
CHANNEL_WIDTH_40) ?
|
||||
ht_cap->cap & IEEE80211_HT_CAP_SGI_40 :
|
||||
ht_cap->cap & IEEE80211_HT_CAP_SGI_20,
|
||||
ht_cap->mcs.rx_mask));
|
||||
}
|
||||
|
||||
void rtw_cfg80211_init_wdev_data(_adapter *padapter)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|
@ -6694,7 +6679,7 @@ void rtw_cfg80211_init_wiphy(_adapter *padapter)
|
|||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
|
||||
struct ieee80211_iface_limit rtw_limits[] = {
|
||||
static struct ieee80211_iface_limit rtw_limits[] = {
|
||||
{
|
||||
.max = 2,
|
||||
.types = BIT(NL80211_IFTYPE_STATION)
|
||||
|
@ -6719,7 +6704,7 @@ struct ieee80211_iface_limit rtw_limits[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
struct ieee80211_iface_combination rtw_combinations[] = {
|
||||
static struct ieee80211_iface_combination rtw_combinations[] = {
|
||||
{
|
||||
.limits = rtw_limits,
|
||||
.n_limits = ARRAY_SIZE(rtw_limits),
|
||||
|
@ -6809,7 +6794,7 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0))
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0))
|
||||
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
||||
#else // kernel >= 4.12
|
||||
wiphy->max_sched_scan_reqs = 1;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <drv_types.h>
|
||||
#include <rtw_mp.h>
|
||||
#include <rtw_mp_ioctl.h>
|
||||
#include <rtw_mlme.h>
|
||||
#include "../../hal/phydm/phydm_precomp.h"
|
||||
#ifdef RTW_HALMAC
|
||||
#include "../../hal/hal_halmac.h"
|
||||
|
@ -43,10 +44,6 @@ extern int rtw_ht_enable;
|
|||
#define MAX_CUSTOM_LEN 64
|
||||
#define RATE_COUNT 4
|
||||
|
||||
#ifdef CONFIG_GLOBAL_UI_PID
|
||||
extern int ui_pid[3];
|
||||
#endif
|
||||
|
||||
/* combo scan */
|
||||
#define WEXT_CSCAN_AMOUNT 9
|
||||
#define WEXT_CSCAN_BUF_LEN 360
|
||||
|
@ -66,7 +63,7 @@ extern u8 str_2char2num(u8 hch, u8 lch);
|
|||
extern void macstr2num(u8 *dst, u8 *src);
|
||||
extern u8 convert_ip_addr(u8 hch, u8 mch, u8 lch);
|
||||
|
||||
u32 rtw_rates[] = {1000000, 2000000, 5500000, 11000000,
|
||||
static u32 rtw_rates[] = {1000000, 2000000, 5500000, 11000000,
|
||||
6000000, 9000000, 12000000, 18000000, 24000000, 36000000, 48000000, 54000000};
|
||||
|
||||
static const char *const iw_operation_mode[] = {
|
||||
|
@ -512,11 +509,12 @@ static inline char *iwe_stream_rate_process(_adapter *padapter,
|
|||
p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], _HT_CAPABILITY_IE_, &ht_ielen, pnetwork->network.IELength - ie_offset);
|
||||
if (p && ht_ielen > 0) {
|
||||
struct rtw_ieee80211_ht_cap *pht_capie;
|
||||
|
||||
ht_cap = _TRUE;
|
||||
pht_capie = (struct rtw_ieee80211_ht_cap *)(p + 2);
|
||||
_rtw_memcpy(&mcs_rate , pht_capie->supp_mcs_set, 2);
|
||||
bw_40MHz = (pht_capie->cap_info & IEEE80211_HT_CAP_SUP_WIDTH) ? 1 : 0;
|
||||
short_GI = (pht_capie->cap_info & (IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40)) ? 1 : 0;
|
||||
bw_40MHz = (le16_to_cpu(pht_capie->cap_info) & IEEE80211_HT_CAP_SUP_WIDTH) ? 1 : 0;
|
||||
short_GI = (le16_to_cpu(pht_capie->cap_info) & (IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40)) ? 1 : 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_80211AC_VHT
|
||||
|
@ -813,19 +811,18 @@ static char *translate_scan(_adapter *padapter,
|
|||
{
|
||||
struct iw_event iwe;
|
||||
u16 cap = 0;
|
||||
_rtw_memset(&iwe, 0, sizeof(iwe));
|
||||
__le16 le_tmp;
|
||||
|
||||
_rtw_memset(&iwe, 0, sizeof(iwe));
|
||||
if (_FALSE == search_p2p_wfd_ie(padapter, info, pnetwork, start, stop))
|
||||
return start;
|
||||
|
||||
start = iwe_stream_mac_addr_proess(padapter, info, pnetwork, start, stop, &iwe);
|
||||
start = iwe_stream_essid_proess(padapter, info, pnetwork, start, stop, &iwe);
|
||||
start = iwe_stream_protocol_process(padapter, info, pnetwork, start, stop, &iwe);
|
||||
if (pnetwork->network.Reserved[0] == 2) /* Probe Request */
|
||||
cap = 0;
|
||||
else {
|
||||
_rtw_memcpy((u8 *)&cap, rtw_get_capability_from_ie(pnetwork->network.IEs), 2);
|
||||
cap = le16_to_cpu(cap);
|
||||
if (pnetwork->network.Reserved[0] != 2) { /* Probe Request */
|
||||
_rtw_memcpy((u8 *)&le_tmp, rtw_get_capability_from_ie(pnetwork->network.IEs), 2);
|
||||
cap = le16_to_cpu(le_tmp);
|
||||
}
|
||||
|
||||
start = iwe_stream_mode_process(padapter, info, pnetwork, start, stop, &iwe, cap);
|
||||
|
@ -2366,9 +2363,9 @@ static int rtw_wx_set_mlme(struct net_device *dev,
|
|||
if (mlme == NULL)
|
||||
return -1;
|
||||
|
||||
RTW_INFO("%s\n", __FUNCTION__);
|
||||
RTW_INFO("%s\n", __func__);
|
||||
|
||||
reason = cpu_to_le16(mlme->reason_code);
|
||||
reason = mlme->reason_code;
|
||||
|
||||
|
||||
RTW_INFO("%s, cmd=%d, reason=%d\n", __FUNCTION__, mlme->cmd, reason);
|
||||
|
@ -4067,11 +4064,10 @@ static void rtw_dbg_mode_hdl(_adapter *padapter, u32 id, u8 *pdata, u32 len)
|
|||
value = prfreg->value;
|
||||
|
||||
rtw_hal_write_rfreg(padapter, path, offset, 0xffffffff, value);
|
||||
|
||||
break;
|
||||
case GEN_MP_IOCTL_SUBCODE(TRIGGER_GPIO):
|
||||
RTW_INFO("==> trigger gpio 0\n");
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_TRIGGER_GPIO_0, 0);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_TRIGGER_GPIO_0, NULL);
|
||||
break;
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
case GEN_MP_IOCTL_SUBCODE(SET_DM_BT):
|
||||
|
@ -4092,8 +4088,8 @@ static void rtw_dbg_mode_hdl(_adapter *padapter, u32 id, u8 *pdata, u32 len)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef MP_IOCTL_HDL
|
||||
static int rtw_mp_ioctl_hdl(struct net_device *dev, struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
|
@ -4804,7 +4800,8 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
|
|||
_queue *queue = &(pmlmepriv->scanned_queue);
|
||||
struct wlan_network *pnetwork = NULL;
|
||||
u8 blnMatch = 0;
|
||||
u16 attr_content = 0;
|
||||
u16 attr_content;
|
||||
__be16 be_tmp;
|
||||
uint attr_contentlen = 0;
|
||||
u8 attr_content_str[P2P_PRIVATE_IOCTL_SET_LEN] = { 0x00 };
|
||||
|
||||
|
@ -4835,19 +4832,16 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
|
|||
|
||||
wpsie = rtw_get_wps_ie_from_scan_queue(&pnetwork->network.IEs[0], pnetwork->network.IELength, NULL, &wpsie_len, pnetwork->network.Reserved[0]);
|
||||
if (wpsie) {
|
||||
rtw_get_wps_attr_content(wpsie, wpsie_len, WPS_ATTR_CONF_METHOD, (u8 *)&attr_content, &attr_contentlen);
|
||||
rtw_get_wps_attr_content(wpsie, wpsie_len, WPS_ATTR_CONF_METHOD, (u8 *)&be_tmp, &attr_contentlen);
|
||||
if (attr_contentlen) {
|
||||
attr_content = be16_to_cpu(attr_content);
|
||||
attr_content = be16_to_cpu(be_tmp);
|
||||
sprintf(attr_content_str, "\n\nM=%.4d", attr_content);
|
||||
blnMatch = 1;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
plist = get_next(plist);
|
||||
|
||||
}
|
||||
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
|
@ -5055,10 +5049,11 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
|
|||
if (wpsie) {
|
||||
rtw_get_wps_attr_content(wpsie, wpsie_len, WPS_ATTR_PRIMARY_DEV_TYPE, dev_type, &dev_type_len);
|
||||
if (dev_type_len) {
|
||||
u16 type = 0;
|
||||
u16 type;
|
||||
__be16 be_tmp;
|
||||
|
||||
_rtw_memcpy(&type, dev_type, 2);
|
||||
type = be16_to_cpu(type);
|
||||
_rtw_memcpy(&be_tmp, dev_type, 2);
|
||||
type = be16_to_cpu(be_tmp);
|
||||
sprintf(dev_type_str, "\n\nN=%.2d", type);
|
||||
blnMatch = 1;
|
||||
}
|
||||
|
@ -6264,11 +6259,8 @@ static int rtw_p2p_get(struct net_device *dev,
|
|||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
{
|
||||
|
||||
int ret = 0;
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct iw_point *pdata = &wrqu->data;
|
||||
|
@ -6276,34 +6268,34 @@ static int rtw_p2p_get(struct net_device *dev,
|
|||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
|
||||
if (padapter->bShowGetP2PState)
|
||||
RTW_INFO("[%s] extra = %s\n", __FUNCTION__, (char *) wrqu->data.pointer);
|
||||
RTW_INFO("[%s] extra = %s\n", __func__, (char *)wrqu->data.pointer);
|
||||
|
||||
if (_rtw_memcmp(wrqu->data.pointer, "status", 6))
|
||||
if (_rtw_memcmp((__force void *)wrqu->data.pointer, "status", 6))
|
||||
rtw_p2p_get_status(dev, info, wrqu, extra);
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "role", 4))
|
||||
else if (_rtw_memcmp((__force void *)wrqu->data.pointer, "role", 4))
|
||||
rtw_p2p_get_role(dev, info, wrqu, extra);
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "peer_ifa", 8))
|
||||
else if (_rtw_memcmp((__force void *)wrqu->data.pointer, "peer_ifa", 8))
|
||||
rtw_p2p_get_peer_ifaddr(dev, info, wrqu, extra);
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "req_cm", 6))
|
||||
else if (_rtw_memcmp((__force void *)wrqu->data.pointer, "req_cm", 6))
|
||||
rtw_p2p_get_req_cm(dev, info, wrqu, extra);
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "peer_deva", 9)) {
|
||||
else if (_rtw_memcmp((__force void *)wrqu->data.pointer, "peer_deva", 9)) {
|
||||
/* Get the P2P device address when receiving the provision discovery request frame. */
|
||||
rtw_p2p_get_peer_devaddr(dev, info, wrqu, extra);
|
||||
} else if (_rtw_memcmp(wrqu->data.pointer, "group_id", 8))
|
||||
} else if (_rtw_memcmp((__force void *)wrqu->data.pointer, "group_id", 8))
|
||||
rtw_p2p_get_groupid(dev, info, wrqu, extra);
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "inv_peer_deva", 13)) {
|
||||
else if (_rtw_memcmp((__force void *)wrqu->data.pointer, "inv_peer_deva", 13)) {
|
||||
/* Get the P2P device address when receiving the P2P Invitation request frame. */
|
||||
rtw_p2p_get_peer_devaddr_by_invitation(dev, info, wrqu, extra);
|
||||
} else if (_rtw_memcmp(wrqu->data.pointer, "op_ch", 5))
|
||||
} else if (_rtw_memcmp((__force void *)wrqu->data.pointer, "op_ch", 5))
|
||||
rtw_p2p_get_op_ch(dev, info, wrqu, extra);
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
if (hal_chk_wl_func(padapter, WL_FUNC_MIRACAST)) {
|
||||
if (_rtw_memcmp(wrqu->data.pointer, "peer_port", 9))
|
||||
if (_rtw_memcmp((__force void *)wrqu->data.pointer, "peer_port", 9))
|
||||
rtw_p2p_get_peer_wfd_port(dev, info, wrqu, extra);
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "wfd_sa", 6))
|
||||
else if (_rtw_memcmp((__force void *)wrqu->data.pointer, "wfd_sa", 6))
|
||||
rtw_p2p_get_peer_wfd_session_available(dev, info, wrqu, extra);
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "wfd_pc", 6))
|
||||
else if (_rtw_memcmp((__force void *)wrqu->data.pointer, "wfd_pc", 6))
|
||||
rtw_p2p_get_peer_wfd_preferred_connection(dev, info, wrqu, extra);
|
||||
}
|
||||
#endif /* CONFIG_WFD */
|
||||
|
@ -9026,7 +9018,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
|
|||
struct pwrctrl_priv *pwrctrlpriv ;
|
||||
u8 *data = NULL;
|
||||
u8 *rawdata = NULL;
|
||||
char *pch, *ptmp, *token, *tmp[3] = {0x00, 0x00, 0x00};
|
||||
char *pch, *ptmp, *token, *tmp[3] = {NULL, NULL, NULL};
|
||||
u16 i = 0, j = 0, mapLen = 0, addr = 0, cnts = 0;
|
||||
u16 max_available_len = 0, raw_cursize = 0, raw_maxsize = 0;
|
||||
u16 mask_len;
|
||||
|
@ -9689,7 +9681,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
|||
u8 *ShadowMapBT = NULL;
|
||||
u8 *ShadowMapWiFi = NULL;
|
||||
u8 *setrawdata = NULL;
|
||||
char *pch, *ptmp, *token, *tmp[3] = {0x00, 0x00, 0x00};
|
||||
char *pch, *ptmp, *token, *tmp[3] = {NULL, NULL, NULL};
|
||||
u16 addr = 0xFF, cnts = 0, BTStatus = 0 , max_available_len = 0;
|
||||
u16 wifimaplen;
|
||||
int err;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#define _MLME_OSDEP_C_
|
||||
|
||||
#include <drv_types.h>
|
||||
|
||||
#include <rtw_mlme.h>
|
||||
|
||||
#ifdef RTK_DMP_PLATFORM
|
||||
void Linkup_workitem_callback(struct work_struct *work)
|
||||
|
@ -187,9 +187,6 @@ void rtw_init_mlme_timer(_adapter *padapter)
|
|||
|
||||
}
|
||||
|
||||
extern void rtw_indicate_wx_assoc_event(_adapter *padapter);
|
||||
extern void rtw_indicate_wx_disassoc_event(_adapter *padapter);
|
||||
|
||||
void rtw_os_indicate_connect(_adapter *adapter)
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||
|
|
|
@ -108,12 +108,12 @@ int rtw_uapsd_acbe_en = 0;
|
|||
int rtw_uapsd_acvi_en = 0;
|
||||
int rtw_uapsd_acvo_en = 0;
|
||||
#if defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C)
|
||||
int rtw_pwrtrim_enable = 2; /* disable kfree , rename to power trim disable */
|
||||
static int rtw_pwrtrim_enable = 2; /* disable kfree , rename to power trim disable */
|
||||
#else
|
||||
int rtw_pwrtrim_enable = 0; /* Default Enalbe power trim by efuse config */
|
||||
static int rtw_pwrtrim_enable = 0; /* Default Enalbe power trim by efuse config */
|
||||
#endif
|
||||
|
||||
uint rtw_tx_bw_mode = 0x21;
|
||||
static uint rtw_tx_bw_mode = 0x21;
|
||||
module_param(rtw_tx_bw_mode, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_tx_bw_mode, "The max tx bw for 2.4G and 5G. format is the same as rtw_bw_mode");
|
||||
|
||||
|
@ -124,22 +124,22 @@ int rtw_ht_enable = 1;
|
|||
* 0x21 means enable 2.4G 40MHz & 5G 80MHz */
|
||||
int rtw_bw_mode = 0x21;
|
||||
int rtw_ampdu_enable = 1;/* for enable tx_ampdu , */ /* 0: disable, 0x1:enable */
|
||||
int rtw_rx_stbc = 1;/* 0: disable, bit(0):enable 2.4g, bit(1):enable 5g, default is set to enable 2.4GHZ for IOT issue with bufflao's AP at 5GHZ */
|
||||
static int rtw_rx_stbc = 1;/* 0: disable, bit(0):enable 2.4g, bit(1):enable 5g, default is set to enable 2.4GHZ for IOT issue with bufflao's AP at 5GHZ */
|
||||
#if (defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8822B)) && defined(CONFIG_PCI_HCI)
|
||||
int rtw_ampdu_amsdu = 2;/* 0: disabled, 1:enabled, 2:auto . There is an IOT issu with DLINK DIR-629 when the flag turn on */
|
||||
static int rtw_ampdu_amsdu = 2;/* 0: disabled, 1:enabled, 2:auto . There is an IOT issu with DLINK DIR-629 when the flag turn on */
|
||||
#else
|
||||
int rtw_ampdu_amsdu = 0;/* 0: disabled, 1:enabled, 2:auto . There is an IOT issu with DLINK DIR-629 when the flag turn on */
|
||||
static int rtw_ampdu_amsdu = 0;/* 0: disabled, 1:enabled, 2:auto . There is an IOT issu with DLINK DIR-629 when the flag turn on */
|
||||
#endif
|
||||
/* Short GI support Bit Map
|
||||
* BIT0 - 20MHz, 0: non-support, 1: support
|
||||
* BIT1 - 40MHz, 0: non-support, 1: support
|
||||
* BIT2 - 80MHz, 0: non-support, 1: support
|
||||
* BIT3 - 160MHz, 0: non-support, 1: support */
|
||||
int rtw_short_gi = 0xf;
|
||||
static int rtw_short_gi = 0xf;
|
||||
/* BIT0: Enable VHT LDPC Rx, BIT1: Enable VHT LDPC Tx, BIT4: Enable HT LDPC Rx, BIT5: Enable HT LDPC Tx */
|
||||
int rtw_ldpc_cap = 0x33;
|
||||
static int rtw_ldpc_cap = 0x33;
|
||||
/* BIT0: Enable VHT STBC Rx, BIT1: Enable VHT STBC Tx, BIT4: Enable HT STBC Rx, BIT5: Enable HT STBC Tx */
|
||||
int rtw_stbc_cap = 0x13;
|
||||
static int rtw_stbc_cap = 0x13;
|
||||
/*
|
||||
* BIT0: Enable VHT SU Beamformer
|
||||
* BIT1: Enable VHT SU Beamformee
|
||||
|
@ -148,52 +148,52 @@ int rtw_stbc_cap = 0x13;
|
|||
* BIT4: Enable HT Beamformer
|
||||
* BIT5: Enable HT Beamformee
|
||||
*/
|
||||
int rtw_beamform_cap = BIT(1) | BIT(3);
|
||||
int rtw_bfer_rf_number = 0; /*BeamformerCapRfNum Rf path number, 0 for auto, others for manual*/
|
||||
int rtw_bfee_rf_number = 0; /*BeamformeeCapRfNum Rf path number, 0 for auto, others for manual*/
|
||||
static int rtw_beamform_cap = BIT(1) | BIT(3);
|
||||
static int rtw_bfer_rf_number = 0; /*BeamformerCapRfNum Rf path number, 0 for auto, others for manual*/
|
||||
static int rtw_bfee_rf_number = 0; /*BeamformeeCapRfNum Rf path number, 0 for auto, others for manual*/
|
||||
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
|
||||
#ifdef CONFIG_80211AC_VHT
|
||||
int rtw_vht_enable = 1; /* 0:disable, 1:enable, 2:force auto enable */
|
||||
static int rtw_vht_enable = 1; /* 0:disable, 1:enable, 2:force auto enable */
|
||||
module_param(rtw_vht_enable, int, 0644);
|
||||
|
||||
int rtw_ampdu_factor = 7;
|
||||
static int rtw_ampdu_factor = 7;
|
||||
|
||||
uint rtw_vht_rx_mcs_map = 0xaaaa;
|
||||
static uint rtw_vht_rx_mcs_map = 0xaaaa;
|
||||
module_param(rtw_vht_rx_mcs_map, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_vht_rx_mcs_map, "VHT RX MCS map");
|
||||
#endif /* CONFIG_80211AC_VHT */
|
||||
|
||||
int rtw_lowrate_two_xmit = 1;/* Use 2 path Tx to transmit MCS0~7 and legacy mode */
|
||||
static int rtw_lowrate_two_xmit = 1;/* Use 2 path Tx to transmit MCS0~7 and legacy mode */
|
||||
|
||||
int rtw_rf_config = RF_TYPE_AUTO;
|
||||
static int rtw_rf_config = RF_TYPE_AUTO;
|
||||
module_param(rtw_rf_config, int, 0644);
|
||||
|
||||
/* 0: not check in watch dog, 1: check in watch dog */
|
||||
int rtw_check_hw_status = 0;
|
||||
static int rtw_check_hw_status = 0;
|
||||
|
||||
int rtw_low_power = 0;
|
||||
static int rtw_low_power = 0;
|
||||
#ifdef CONFIG_WIFI_TEST
|
||||
int rtw_wifi_spec = 1;/* for wifi test */
|
||||
static int rtw_wifi_spec = 1;/* for wifi test */
|
||||
#else
|
||||
int rtw_wifi_spec = 0;
|
||||
static int rtw_wifi_spec = 0;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEFAULT_PATTERNS_EN
|
||||
bool rtw_support_default_patterns = _TRUE;
|
||||
static bool rtw_support_default_patterns = _TRUE;
|
||||
#else
|
||||
bool rtw_support_default_patterns = _FALSE;
|
||||
static bool rtw_support_default_patterns = _FALSE;
|
||||
#endif
|
||||
|
||||
int rtw_special_rf_path = 0; /* 0: 2T2R ,1: only turn on path A 1T1R */
|
||||
static int rtw_special_rf_path = 0; /* 0: 2T2R ,1: only turn on path A 1T1R */
|
||||
|
||||
char rtw_country_unspecified[] = {0xFF, 0xFF, 0x00};
|
||||
char *rtw_country_code = rtw_country_unspecified;
|
||||
static char rtw_country_unspecified[] = {0xFF, 0xFF, 0x00};
|
||||
static char *rtw_country_code = rtw_country_unspecified;
|
||||
module_param(rtw_country_code, charp, 0644);
|
||||
MODULE_PARM_DESC(rtw_country_code, "The default country code (in alpha2)");
|
||||
|
||||
int rtw_channel_plan = RTW_CHPLAN_MAX;
|
||||
static int rtw_channel_plan = RTW_CHPLAN_MAX;
|
||||
module_param(rtw_channel_plan, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_channel_plan, "The default chplan ID when rtw_alpha2 is not specified or valid");
|
||||
|
||||
|
@ -205,54 +205,54 @@ MODULE_PARM_DESC(rtw_excl_chs, "exclusive channel array");
|
|||
/*if concurrent softap + p2p(GO) is needed, this param lets p2p response full channel list.
|
||||
But Softap must be SHUT DOWN once P2P decide to set up connection and become a GO.*/
|
||||
#ifdef CONFIG_FULL_CH_IN_P2P_HANDSHAKE
|
||||
int rtw_full_ch_in_p2p_handshake = 1; /* reply full channel list*/
|
||||
static int rtw_full_ch_in_p2p_handshake = 1; /* reply full channel list*/
|
||||
#else
|
||||
int rtw_full_ch_in_p2p_handshake = 0; /* reply only softap channel*/
|
||||
static int rtw_full_ch_in_p2p_handshake = 0; /* reply only softap channel*/
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
int rtw_btcoex_enable = 2;
|
||||
static int rtw_btcoex_enable = 2;
|
||||
module_param(rtw_btcoex_enable, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_btcoex_enable, "BT co-existence on/off, 0:off, 1:on, 2:by efuse");
|
||||
|
||||
int rtw_ant_num = 0;
|
||||
static int rtw_ant_num = 0;
|
||||
module_param(rtw_ant_num, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_ant_num, "Antenna number setting, 0:by efuse");
|
||||
|
||||
int rtw_bt_iso = 2;/* 0:Low, 1:High, 2:From Efuse */
|
||||
int rtw_bt_sco = 3;/* 0:Idle, 1:None-SCO, 2:SCO, 3:From Counter, 4.Busy, 5.OtherBusy */
|
||||
int rtw_bt_ampdu = 1 ; /* 0:Disable BT control A-MPDU, 1:Enable BT control A-MPDU. */
|
||||
static int rtw_bt_iso = 2;/* 0:Low, 1:High, 2:From Efuse */
|
||||
static int rtw_bt_sco = 3;/* 0:Idle, 1:None-SCO, 2:SCO, 3:From Counter, 4.Busy, 5.OtherBusy */
|
||||
static int rtw_bt_ampdu = 1 ; /* 0:Disable BT control A-MPDU, 1:Enable BT control A-MPDU. */
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
|
||||
int rtw_AcceptAddbaReq = _TRUE;/* 0:Reject AP's Add BA req, 1:Accept AP's Add BA req. */
|
||||
static int rtw_AcceptAddbaReq = _TRUE;/* 0:Reject AP's Add BA req, 1:Accept AP's Add BA req. */
|
||||
|
||||
int rtw_antdiv_cfg = 2; /* 0:OFF , 1:ON, 2:decide by Efuse config */
|
||||
int rtw_antdiv_type = 0
|
||||
static int rtw_antdiv_cfg = 2; /* 0:OFF , 1:ON, 2:decide by Efuse config */
|
||||
static int rtw_antdiv_type = 0
|
||||
; /* 0:decide by efuse 1: for 88EE, 1Tx and 1RxCG are diversity.(2 Ant with SPDT), 2: for 88EE, 1Tx and 2Rx are diversity.( 2 Ant, Tx and RxCG are both on aux port, RxCS is on main port ), 3: for 88EE, 1Tx and 1RxCG are fixed.(1Ant, Tx and RxCG are both on aux port) */
|
||||
|
||||
int rtw_drv_ant_band_switch = 1; /* 0:OFF , 1:ON, Driver control antenna band switch*/
|
||||
static int rtw_drv_ant_band_switch = 1; /* 0:OFF , 1:ON, Driver control antenna band switch*/
|
||||
|
||||
/* 0: doesn't switch, 1: switch from usb2.0 to usb 3.0 2: switch from usb3.0 to usb 2.0 */
|
||||
int rtw_switch_usb_mode = 0;
|
||||
static int rtw_switch_usb_mode = 0;
|
||||
|
||||
#ifdef CONFIG_USB_AUTOSUSPEND
|
||||
int rtw_enusbss = 1;/* 0:disable,1:enable */
|
||||
static int rtw_enusbss = 1;/* 0:disable,1:enable */
|
||||
#else
|
||||
int rtw_enusbss = 0;/* 0:disable,1:enable */
|
||||
static int rtw_enusbss = 0;/* 0:disable,1:enable */
|
||||
#endif
|
||||
|
||||
int rtw_hwpdn_mode = 2; /* 0:disable,1:enable,2: by EFUSE config */
|
||||
static int rtw_hwpdn_mode = 2; /* 0:disable,1:enable,2: by EFUSE config */
|
||||
|
||||
#ifdef CONFIG_HW_PWRP_DETECTION
|
||||
int rtw_hwpwrp_detect = 1;
|
||||
static int rtw_hwpwrp_detect = 1;
|
||||
#else
|
||||
int rtw_hwpwrp_detect = 0; /* HW power ping detect 0:disable , 1:enable */
|
||||
static int rtw_hwpwrp_detect = 0; /* HW power ping detect 0:disable , 1:enable */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
int rtw_hw_wps_pbc = 1;
|
||||
static int rtw_hw_wps_pbc = 1;
|
||||
#else
|
||||
int rtw_hw_wps_pbc = 0;
|
||||
static int rtw_hw_wps_pbc = 0;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
|
@ -260,45 +260,45 @@ int rtw_mc2u_disable = 0;
|
|||
#endif /* CONFIG_TX_MCAST2UNI */
|
||||
|
||||
#ifdef CONFIG_80211D
|
||||
int rtw_80211d = 0;
|
||||
static int rtw_80211d = 0;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SPECIAL_SETTING_FOR_FUNAI_TV
|
||||
int rtw_force_ant = 2;/* 0 :normal, 1:Main ant, 2:Aux ant */
|
||||
int rtw_force_igi = 0; /* 0 :normal */
|
||||
static int rtw_force_ant = 2;/* 0 :normal, 1:Main ant, 2:Aux ant */
|
||||
static int rtw_force_igi = 0; /* 0 :normal */
|
||||
module_param(rtw_force_ant, int, 0644);
|
||||
module_param(rtw_force_igi, int, 0644);
|
||||
#endif
|
||||
|
||||
int rtw_force_igi_lb = CONFIG_RTW_FORCE_IGI_LB;
|
||||
static int rtw_force_igi_lb = CONFIG_RTW_FORCE_IGI_LB;
|
||||
module_param(rtw_force_igi_lb, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_force_igi_lb, "force IGI low-bound, 0:no specified");
|
||||
|
||||
#ifdef CONFIG_QOS_OPTIMIZATION
|
||||
int rtw_qos_opt_enable = 1; /* 0: disable,1:enable */
|
||||
static int rtw_qos_opt_enable = 1; /* 0: disable,1:enable */
|
||||
#else
|
||||
int rtw_qos_opt_enable = 0; /* 0: disable,1:enable */
|
||||
static int rtw_qos_opt_enable = 0; /* 0: disable,1:enable */
|
||||
#endif
|
||||
module_param(rtw_qos_opt_enable, int, 0644);
|
||||
|
||||
#ifdef CONFIG_AUTO_CHNL_SEL_NHM
|
||||
int rtw_acs_mode = 1; /*0:disable, 1:enable*/
|
||||
static int rtw_acs_mode = 1; /*0:disable, 1:enable*/
|
||||
module_param(rtw_acs_mode, int, 0644);
|
||||
|
||||
int rtw_acs_auto_scan = 0; /*0:disable, 1:enable*/
|
||||
static int rtw_acs_auto_scan = 0; /*0:disable, 1:enable*/
|
||||
module_param(rtw_acs_auto_scan, int, 0644);
|
||||
|
||||
#endif
|
||||
|
||||
char *ifname = "wlan%d";
|
||||
static char *ifname = "wlan%d";
|
||||
module_param(ifname, charp, 0644);
|
||||
MODULE_PARM_DESC(ifname, "The default name to allocate for first interface");
|
||||
|
||||
char *if2name = "wlan%d";
|
||||
static char *if2name = "wlan%d";
|
||||
module_param(if2name, charp, 0644);
|
||||
MODULE_PARM_DESC(if2name, "The default name to allocate for second interface");
|
||||
|
||||
char *rtw_initmac = 0; /* temp mac address if users want to use instead of the mac address in Efuse */
|
||||
char *rtw_initmac = NULL; /* temp mac address if users want to use instead of the mac address in Efuse */
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|
||||
|
@ -362,34 +362,34 @@ module_param(rtw_check_hw_status, int, 0644);
|
|||
module_param(rtw_early_mode, int, 0644);
|
||||
#endif
|
||||
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
char *rtw_adaptor_info_caching_file_path = "/data/misc/wifi/rtw_cache";
|
||||
static char *rtw_adaptor_info_caching_file_path = "/data/misc/wifi/rtw_cache";
|
||||
module_param(rtw_adaptor_info_caching_file_path, charp, 0644);
|
||||
MODULE_PARM_DESC(rtw_adaptor_info_caching_file_path, "The path of adapter info cache file");
|
||||
#endif /* CONFIG_ADAPTOR_INFO_CACHING_FILE */
|
||||
|
||||
#ifdef CONFIG_LAYER2_ROAMING
|
||||
uint rtw_max_roaming_times = 2;
|
||||
static uint rtw_max_roaming_times = 2;
|
||||
module_param(rtw_max_roaming_times, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_max_roaming_times, "The max roaming times to try");
|
||||
#endif /* CONFIG_LAYER2_ROAMING */
|
||||
|
||||
#ifdef CONFIG_IOL
|
||||
int rtw_fw_iol = 1;
|
||||
static int rtw_fw_iol = 1;
|
||||
module_param(rtw_fw_iol, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_fw_iol, "FW IOL. 0:Disable, 1:enable, 2:by usb speed");
|
||||
#endif /* CONFIG_IOL */
|
||||
|
||||
#ifdef CONFIG_FILE_FWIMG
|
||||
char *rtw_fw_file_path = "/system/etc/firmware/rtlwifi/FW_NIC.BIN";
|
||||
static char *rtw_fw_file_path = "/system/etc/firmware/rtlwifi/FW_NIC.BIN";
|
||||
module_param(rtw_fw_file_path, charp, 0644);
|
||||
MODULE_PARM_DESC(rtw_fw_file_path, "The path of fw image");
|
||||
|
||||
char *rtw_fw_wow_file_path = "/system/etc/firmware/rtlwifi/FW_WoWLAN.BIN";
|
||||
static char *rtw_fw_wow_file_path = "/system/etc/firmware/rtlwifi/FW_WoWLAN.BIN";
|
||||
module_param(rtw_fw_wow_file_path, charp, 0644);
|
||||
MODULE_PARM_DESC(rtw_fw_wow_file_path, "The path of fw for Wake on Wireless image");
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
char *rtw_fw_mp_bt_file_path = "";
|
||||
static char *rtw_fw_mp_bt_file_path = "";
|
||||
module_param(rtw_fw_mp_bt_file_path, charp, 0644);
|
||||
MODULE_PARM_DESC(rtw_fw_mp_bt_file_path, "The path of fw for MP-BT image");
|
||||
#endif /* CONFIG_MP_INCLUDED */
|
||||
|
@ -404,106 +404,105 @@ module_param(rtw_80211d, int, 0644);
|
|||
MODULE_PARM_DESC(rtw_80211d, "Enable 802.11d mechanism");
|
||||
#endif
|
||||
|
||||
uint rtw_notch_filter = RTW_NOTCH_FILTER;
|
||||
static uint rtw_notch_filter = RTW_NOTCH_FILTER;
|
||||
module_param(rtw_notch_filter, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_notch_filter, "0:Disable, 1:Enable, 2:Enable only for P2P");
|
||||
|
||||
uint rtw_hiq_filter = CONFIG_RTW_HIQ_FILTER;
|
||||
static uint rtw_hiq_filter = CONFIG_RTW_HIQ_FILTER;
|
||||
module_param(rtw_hiq_filter, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_hiq_filter, "0:allow all, 1:allow special, 2:deny all");
|
||||
|
||||
uint rtw_adaptivity_en = CONFIG_RTW_ADAPTIVITY_EN;
|
||||
static uint rtw_adaptivity_en = CONFIG_RTW_ADAPTIVITY_EN;
|
||||
module_param(rtw_adaptivity_en, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_adaptivity_en, "0:disable, 1:enable");
|
||||
|
||||
uint rtw_adaptivity_mode = CONFIG_RTW_ADAPTIVITY_MODE;
|
||||
static uint rtw_adaptivity_mode = CONFIG_RTW_ADAPTIVITY_MODE;
|
||||
module_param(rtw_adaptivity_mode, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_adaptivity_mode, "0:normal, 1:carrier sense");
|
||||
|
||||
uint rtw_adaptivity_dml = CONFIG_RTW_ADAPTIVITY_DML;
|
||||
static uint rtw_adaptivity_dml = CONFIG_RTW_ADAPTIVITY_DML;
|
||||
module_param(rtw_adaptivity_dml, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_adaptivity_dml, "0:disable, 1:enable");
|
||||
|
||||
uint rtw_adaptivity_dc_backoff = CONFIG_RTW_ADAPTIVITY_DC_BACKOFF;
|
||||
static uint rtw_adaptivity_dc_backoff = CONFIG_RTW_ADAPTIVITY_DC_BACKOFF;
|
||||
module_param(rtw_adaptivity_dc_backoff, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_adaptivity_dc_backoff, "DC backoff for Adaptivity");
|
||||
|
||||
int rtw_adaptivity_th_l2h_ini = CONFIG_RTW_ADAPTIVITY_TH_L2H_INI;
|
||||
static int rtw_adaptivity_th_l2h_ini = CONFIG_RTW_ADAPTIVITY_TH_L2H_INI;
|
||||
module_param(rtw_adaptivity_th_l2h_ini, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_adaptivity_th_l2h_ini, "th_l2h_ini for Adaptivity");
|
||||
|
||||
int rtw_adaptivity_th_edcca_hl_diff = CONFIG_RTW_ADAPTIVITY_TH_EDCCA_HL_DIFF;
|
||||
static int rtw_adaptivity_th_edcca_hl_diff = CONFIG_RTW_ADAPTIVITY_TH_EDCCA_HL_DIFF;
|
||||
module_param(rtw_adaptivity_th_edcca_hl_diff, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_adaptivity_th_edcca_hl_diff, "th_edcca_hl_diff for Adaptivity");
|
||||
|
||||
#ifdef CONFIG_DFS_MASTER
|
||||
uint rtw_dfs_region_domain = CONFIG_RTW_DFS_REGION_DOMAIN;
|
||||
static uint rtw_dfs_region_domain = CONFIG_RTW_DFS_REGION_DOMAIN;
|
||||
module_param(rtw_dfs_region_domain, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_dfs_region_domain, "0:UNKNOWN, 1:FCC, 2:MKK, 3:ETSI");
|
||||
#endif
|
||||
|
||||
uint rtw_amplifier_type_2g = CONFIG_RTW_AMPLIFIER_TYPE_2G;
|
||||
static uint rtw_amplifier_type_2g = CONFIG_RTW_AMPLIFIER_TYPE_2G;
|
||||
module_param(rtw_amplifier_type_2g, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_amplifier_type_2g, "BIT3:2G ext-PA, BIT4:2G ext-LNA");
|
||||
|
||||
uint rtw_amplifier_type_5g = CONFIG_RTW_AMPLIFIER_TYPE_5G;
|
||||
static uint rtw_amplifier_type_5g = CONFIG_RTW_AMPLIFIER_TYPE_5G;
|
||||
module_param(rtw_amplifier_type_5g, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_amplifier_type_5g, "BIT6:5G ext-PA, BIT7:5G ext-LNA");
|
||||
|
||||
uint rtw_RFE_type = CONFIG_RTW_RFE_TYPE;
|
||||
static uint rtw_RFE_type = CONFIG_RTW_RFE_TYPE;
|
||||
module_param(rtw_RFE_type, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_RFE_type, "default init value:64");
|
||||
|
||||
uint rtw_powertracking_type = 64;
|
||||
static uint rtw_powertracking_type = 64;
|
||||
module_param(rtw_powertracking_type, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_powertracking_type, "default init value:64");
|
||||
|
||||
uint rtw_GLNA_type = CONFIG_RTW_GLNA_TYPE;
|
||||
static uint rtw_GLNA_type = CONFIG_RTW_GLNA_TYPE;
|
||||
module_param(rtw_GLNA_type, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_GLNA_type, "default init value:0");
|
||||
|
||||
uint rtw_TxBBSwing_2G = 0xFF;
|
||||
static uint rtw_TxBBSwing_2G = 0xFF;
|
||||
module_param(rtw_TxBBSwing_2G, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_TxBBSwing_2G, "default init value:0xFF");
|
||||
|
||||
uint rtw_TxBBSwing_5G = 0xFF;
|
||||
static uint rtw_TxBBSwing_5G = 0xFF;
|
||||
module_param(rtw_TxBBSwing_5G, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_TxBBSwing_5G, "default init value:0xFF");
|
||||
|
||||
uint rtw_OffEfuseMask = 0;
|
||||
static uint rtw_OffEfuseMask = 0;
|
||||
module_param(rtw_OffEfuseMask, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_OffEfuseMask, "default open Efuse Mask value:0");
|
||||
|
||||
uint rtw_FileMaskEfuse = 0;
|
||||
static uint rtw_FileMaskEfuse = 0;
|
||||
module_param(rtw_FileMaskEfuse, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_FileMaskEfuse, "default drv Mask Efuse value:0");
|
||||
|
||||
uint rtw_rxgain_offset_2g = 0;
|
||||
static uint rtw_rxgain_offset_2g = 0;
|
||||
module_param(rtw_rxgain_offset_2g, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_rxgain_offset_2g, "default RF Gain 2G Offset value:0");
|
||||
|
||||
uint rtw_rxgain_offset_5gl = 0;
|
||||
static uint rtw_rxgain_offset_5gl = 0;
|
||||
module_param(rtw_rxgain_offset_5gl, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_rxgain_offset_5gl, "default RF Gain 5GL Offset value:0");
|
||||
|
||||
uint rtw_rxgain_offset_5gm = 0;
|
||||
static uint rtw_rxgain_offset_5gm = 0;
|
||||
module_param(rtw_rxgain_offset_5gm, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_rxgain_offset_5gm, "default RF Gain 5GM Offset value:0");
|
||||
|
||||
uint rtw_rxgain_offset_5gh = 0;
|
||||
static uint rtw_rxgain_offset_5gh = 0;
|
||||
module_param(rtw_rxgain_offset_5gh, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_rxgain_offset_5gm, "default RF Gain 5GL Offset value:0");
|
||||
|
||||
|
||||
uint rtw_pll_ref_clk_sel = CONFIG_RTW_PLL_REF_CLK_SEL;
|
||||
static uint rtw_pll_ref_clk_sel = CONFIG_RTW_PLL_REF_CLK_SEL;
|
||||
module_param(rtw_pll_ref_clk_sel, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_pll_ref_clk_sel, "force pll_ref_clk_sel, 0xF:use autoload value");
|
||||
|
||||
int rtw_tx_pwr_by_rate = CONFIG_TXPWR_BY_RATE_EN;
|
||||
static int rtw_tx_pwr_by_rate = CONFIG_TXPWR_BY_RATE_EN;
|
||||
module_param(rtw_tx_pwr_by_rate, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_tx_pwr_by_rate, "0:Disable, 1:Enable, 2: Depend on efuse");
|
||||
|
||||
int rtw_tx_pwr_lmt_enable = CONFIG_TXPWR_LIMIT_EN;
|
||||
static int rtw_tx_pwr_lmt_enable = CONFIG_TXPWR_LIMIT_EN;
|
||||
module_param(rtw_tx_pwr_lmt_enable, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_tx_pwr_lmt_enable, "0:Disable, 1:Enable, 2: Depend on efuse");
|
||||
|
||||
|
@ -561,10 +560,10 @@ MODULE_PARM_DESC(rtw_phy_file_path, "The path of phy parameter");
|
|||
* BIT4 - RF, 0: non-support, 1: support
|
||||
* BIT5 - RF_TXPWR_TRACK, 0: non-support, 1: support
|
||||
* BIT6 - RF_TXPWR_LMT, 0: non-support, 1: support */
|
||||
int rtw_load_phy_file = (BIT2 | BIT6);
|
||||
static int rtw_load_phy_file = (BIT2 | BIT6);
|
||||
module_param(rtw_load_phy_file, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_load_phy_file, "PHY File Bit Map");
|
||||
int rtw_decrypt_phy_file = 0;
|
||||
static int rtw_decrypt_phy_file = 0;
|
||||
module_param(rtw_decrypt_phy_file, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_decrypt_phy_file, "Enable Decrypt PHY File");
|
||||
#endif
|
||||
|
@ -588,22 +587,22 @@ extern int rtw_sdio_set_power(int on);
|
|||
|
||||
#ifdef CONFIG_MCC_MODE
|
||||
/* enable MCC mode or not */
|
||||
int rtw_en_mcc = 1;
|
||||
static int rtw_en_mcc = 1;
|
||||
/* can referece following value before insmod driver */
|
||||
int rtw_mcc_ap_bw20_target_tx_tp = MCC_AP_BW20_TARGET_TX_TP;
|
||||
int rtw_mcc_ap_bw40_target_tx_tp = MCC_AP_BW40_TARGET_TX_TP;
|
||||
int rtw_mcc_ap_bw80_target_tx_tp = MCC_AP_BW80_TARGET_TX_TP;
|
||||
int rtw_mcc_sta_bw20_target_tx_tp = MCC_STA_BW20_TARGET_TX_TP;
|
||||
int rtw_mcc_sta_bw40_target_tx_tp = MCC_STA_BW40_TARGET_TX_TP;
|
||||
int rtw_mcc_sta_bw80_target_tx_tp = MCC_STA_BW80_TARGET_TX_TP;
|
||||
int rtw_mcc_single_tx_cri = MCC_SINGLE_TX_CRITERIA;
|
||||
int rtw_mcc_policy_table_idx = 0;
|
||||
int rtw_mcc_duration = 0;
|
||||
int rtw_mcc_tsf_sync_offset = 0;
|
||||
int rtw_mcc_start_time_offset = 0;
|
||||
int rtw_mcc_interval = 0;
|
||||
int rtw_mcc_guard_offset0 = -1;
|
||||
int rtw_mcc_guard_offset1 = -1;
|
||||
static int rtw_mcc_ap_bw20_target_tx_tp = MCC_AP_BW20_TARGET_TX_TP;
|
||||
static int rtw_mcc_ap_bw40_target_tx_tp = MCC_AP_BW40_TARGET_TX_TP;
|
||||
static int rtw_mcc_ap_bw80_target_tx_tp = MCC_AP_BW80_TARGET_TX_TP;
|
||||
static int rtw_mcc_sta_bw20_target_tx_tp = MCC_STA_BW20_TARGET_TX_TP;
|
||||
static int rtw_mcc_sta_bw40_target_tx_tp = MCC_STA_BW40_TARGET_TX_TP;
|
||||
static int rtw_mcc_sta_bw80_target_tx_tp = MCC_STA_BW80_TARGET_TX_TP;
|
||||
static int rtw_mcc_single_tx_cri = MCC_SINGLE_TX_CRITERIA;
|
||||
static int rtw_mcc_policy_table_idx = 0;
|
||||
static int rtw_mcc_duration = 0;
|
||||
static int rtw_mcc_tsf_sync_offset = 0;
|
||||
static int rtw_mcc_start_time_offset = 0;
|
||||
static int rtw_mcc_interval = 0;
|
||||
static int rtw_mcc_guard_offset0 = -1;
|
||||
static int rtw_mcc_guard_offset1 = -1;
|
||||
module_param(rtw_en_mcc, int, 0644);
|
||||
module_param(rtw_mcc_single_tx_cri, int, 0644);
|
||||
module_param(rtw_mcc_ap_bw20_target_tx_tp, int, 0644);
|
||||
|
@ -624,17 +623,17 @@ module_param(rtw_mcc_guard_offset1, int, 0644);
|
|||
#ifdef CONFIG_RTW_NAPI
|
||||
/*following setting should define NAPI in Makefile
|
||||
enable napi only = 1, disable napi = 0*/
|
||||
int rtw_en_napi = 1;
|
||||
static int rtw_en_napi = 1;
|
||||
module_param(rtw_en_napi, int, 0644);
|
||||
#ifdef CONFIG_RTW_GRO
|
||||
/*following setting should define GRO in Makefile
|
||||
enable gro = 1, disable gro = 0*/
|
||||
int rtw_en_gro = 1;
|
||||
static int rtw_en_gro = 1;
|
||||
module_param(rtw_en_gro, int, 0644);
|
||||
#endif /* CONFIG_RTW_GRO */
|
||||
#endif /* CONFIG_RTW_NAPI */
|
||||
|
||||
void rtw_regsty_load_target_tx_power(struct registry_priv *regsty)
|
||||
static void rtw_regsty_load_target_tx_power(struct registry_priv *regsty)
|
||||
{
|
||||
int path, rs;
|
||||
int *target_tx_pwr;
|
||||
|
@ -1047,7 +1046,7 @@ static struct net_device_stats *rtw_net_get_stats(struct net_device *pnetdev)
|
|||
static const u16 rtw_1d_to_queue[8] = { 2, 3, 3, 2, 1, 1, 0, 0 };
|
||||
|
||||
/* Given a data frame determine the 802.1p/1d tag to use. */
|
||||
unsigned int rtw_classify8021d(struct sk_buff *skb)
|
||||
static unsigned int rtw_classify8021d(struct sk_buff *skb)
|
||||
{
|
||||
unsigned int dscp;
|
||||
|
||||
|
@ -1096,7 +1095,7 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
|
|||
{
|
||||
struct iphdr *piphdr;
|
||||
unsigned int dscp;
|
||||
u16 eth_type;
|
||||
__be16 eth_type;
|
||||
u32 priority;
|
||||
u8 *pdata = skb->data;
|
||||
|
||||
|
@ -1104,20 +1103,15 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
|
|||
|
||||
switch (eth_type) {
|
||||
case htons(ETH_P_IP):
|
||||
|
||||
piphdr = (struct iphdr *)(pdata + ETH_HLEN);
|
||||
|
||||
dscp = piphdr->tos & 0xfc;
|
||||
|
||||
priority = dscp >> 5;
|
||||
|
||||
break;
|
||||
default:
|
||||
priority = 0;
|
||||
}
|
||||
|
||||
return rtw_1d_to_queue[priority];
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1173,8 +1167,7 @@ void rtw_ndev_notifier_unregister(void)
|
|||
unregister_netdevice_notifier(&rtw_ndev_notifier);
|
||||
}
|
||||
|
||||
|
||||
int rtw_ndev_init(struct net_device *dev)
|
||||
static int rtw_ndev_init(struct net_device *dev)
|
||||
{
|
||||
_adapter *adapter = rtw_netdev_priv(dev);
|
||||
|
||||
|
@ -1187,7 +1180,7 @@ int rtw_ndev_init(struct net_device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void rtw_ndev_uninit(struct net_device *dev)
|
||||
static void rtw_ndev_uninit(struct net_device *dev)
|
||||
{
|
||||
_adapter *adapter = rtw_netdev_priv(dev);
|
||||
|
||||
|
@ -1258,7 +1251,7 @@ int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void rtw_hook_if_ops(struct net_device *ndev)
|
||||
static void rtw_hook_if_ops(struct net_device *ndev)
|
||||
{
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29))
|
||||
ndev->netdev_ops = &rtw_netdev_ops;
|
||||
|
@ -1323,7 +1316,7 @@ struct net_device *rtw_init_netdev(_adapter *old_padapter)
|
|||
return pnetdev;
|
||||
}
|
||||
|
||||
int rtw_os_ndev_alloc(_adapter *adapter)
|
||||
static int rtw_os_ndev_alloc(_adapter *adapter)
|
||||
{
|
||||
int ret = _FAIL;
|
||||
struct net_device *ndev = NULL;
|
||||
|
@ -1371,7 +1364,7 @@ void rtw_os_ndev_free(_adapter *adapter)
|
|||
}
|
||||
}
|
||||
|
||||
int rtw_os_ndev_register(_adapter *adapter, const char *name)
|
||||
static int rtw_os_ndev_register(_adapter *adapter, const char *name)
|
||||
{
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
int ret = _SUCCESS;
|
||||
|
@ -1506,7 +1499,7 @@ void rtw_os_ndev_deinit(_adapter *adapter)
|
|||
rtw_os_ndev_free(adapter);
|
||||
}
|
||||
|
||||
int rtw_os_ndevs_alloc(struct dvobj_priv *dvobj)
|
||||
static int rtw_os_ndevs_alloc(struct dvobj_priv *dvobj)
|
||||
{
|
||||
int i, status = _SUCCESS;
|
||||
_adapter *adapter;
|
||||
|
@ -1559,7 +1552,7 @@ exit:
|
|||
return status;
|
||||
}
|
||||
|
||||
void rtw_os_ndevs_free(struct dvobj_priv *dvobj)
|
||||
static void rtw_os_ndevs_free(struct dvobj_priv *dvobj)
|
||||
{
|
||||
int i;
|
||||
_adapter *adapter = NULL;
|
||||
|
@ -2596,7 +2589,7 @@ void rtw_drv_del_vir_ifaces(_adapter *primary_padapter)
|
|||
|
||||
#endif /*end of CONFIG_CONCURRENT_MODE*/
|
||||
|
||||
int rtw_os_ndevs_register(struct dvobj_priv *dvobj)
|
||||
static int rtw_os_ndevs_register(struct dvobj_priv *dvobj)
|
||||
{
|
||||
int i, status = _SUCCESS;
|
||||
struct registry_priv *regsty = dvobj_to_regsty(dvobj);
|
||||
|
@ -2935,7 +2928,7 @@ int netdev_open(struct net_device *pnetdev)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_IPS
|
||||
int ips_netdrv_open(_adapter *padapter)
|
||||
static int ips_netdrv_open(_adapter *padapter)
|
||||
{
|
||||
int status = _SUCCESS;
|
||||
/* struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); */
|
||||
|
@ -3026,16 +3019,13 @@ void rtw_ips_dev_unload(_adapter *padapter)
|
|||
#endif /* #ifdef DBG_CONFIG_ERROR_DETECT */
|
||||
#endif /* defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) */
|
||||
{
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_FIFO_CLEARN_UP, 0);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_FIFO_CLEARN_UP, NULL);
|
||||
rtw_intf_stop(padapter);
|
||||
}
|
||||
|
||||
if (!rtw_is_surprise_removed(padapter))
|
||||
rtw_hal_deinit(padapter);
|
||||
|
||||
}
|
||||
|
||||
|
||||
int pm_netdev_open(struct net_device *pnetdev, u8 bnormal)
|
||||
{
|
||||
int status = 0;
|
||||
|
@ -3161,10 +3151,9 @@ static int netdev_close(struct net_device *pnetdev)
|
|||
RTW_INFO("-871x_drv - drv_close, bup=%d\n", padapter->bup);
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
int pm_netdev_close(struct net_device *pnetdev, u8 bnormal)
|
||||
static int pm_netdev_close(struct net_device *pnetdev, u8 bnormal)
|
||||
{
|
||||
int status = 0;
|
||||
|
||||
|
@ -3847,7 +3836,7 @@ int rtw_suspend_ap_wow(_adapter *padapter)
|
|||
#endif /* #ifdef CONFIG_AP_WOWLAN */
|
||||
|
||||
|
||||
int rtw_suspend_normal(_adapter *padapter)
|
||||
static int rtw_suspend_normal(_adapter *padapter)
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
|
@ -4258,7 +4247,7 @@ exit:
|
|||
}
|
||||
#endif /* #ifdef CONFIG_APWOWLAN */
|
||||
|
||||
void rtw_mi_resume_process_normal(_adapter *padapter)
|
||||
static void rtw_mi_resume_process_normal(_adapter *padapter)
|
||||
{
|
||||
int i;
|
||||
_adapter *iface;
|
||||
|
@ -4287,13 +4276,12 @@ void rtw_mi_resume_process_normal(_adapter *padapter)
|
|||
}
|
||||
}
|
||||
|
||||
int rtw_resume_process_normal(_adapter *padapter)
|
||||
static int rtw_resume_process_normal(_adapter *padapter)
|
||||
{
|
||||
struct net_device *pnetdev;
|
||||
struct pwrctrl_priv *pwrpriv;
|
||||
struct dvobj_priv *psdpriv;
|
||||
struct debug_priv *pdbgpriv;
|
||||
|
||||
int ret = _SUCCESS;
|
||||
|
||||
if (!padapter) {
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#define _RECV_OSDEP_C_
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <usb_osintf.h>
|
||||
|
||||
int rtw_os_recvframe_duplicate_skb(_adapter *padapter, union recv_frame *pcloneframe, _pkt *pskb)
|
||||
{
|
||||
|
@ -456,7 +457,6 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, struct rx_pkt_attri
|
|||
|
||||
|
||||
if (br_port && (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_ADHOC_STATE) == _TRUE)) {
|
||||
int nat25_handle_frame(_adapter *priv, struct sk_buff *skb);
|
||||
if (nat25_handle_frame(padapter, pkt) == -1) {
|
||||
/* priv->ext_stats.rx_data_drops++; */
|
||||
/* DEBUG_ERR("RX DROP: nat25_handle_frame fail!\n"); */
|
||||
|
|
|
@ -150,7 +150,8 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
|
|||
/*=== Customer ID ===*/
|
||||
/****** 8188EUS ********/
|
||||
{USB_DEVICE(0x07B8, 0x8179), .driver_info = RTL8188E}, /* Abocom - Abocom */
|
||||
{USB_DEVICE(0x2357, 0x010C), .driver_info = RTL8188E}, /* TPLINK - TPLINK */
|
||||
{USB_DEVICE(0x2001, 0x331B), .driver_info = RTL8188E}, /* D-Link DWA-121 rev B1 */
|
||||
{USB_DEVICE(0x2357, 0x010C), .driver_info = RTL8188E}, /* TPLINK - TPLINK */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8812A
|
||||
|
@ -257,7 +258,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
|
|||
|
||||
MODULE_DEVICE_TABLE(usb, rtw_usb_id_tbl);
|
||||
|
||||
int const rtw_usb_id_len = sizeof(rtw_usb_id_tbl) / sizeof(struct usb_device_id);
|
||||
static int const rtw_usb_id_len = sizeof(rtw_usb_id_tbl) / sizeof(struct usb_device_id);
|
||||
|
||||
static struct specific_device_id specific_device_id_tbl[] = {
|
||||
{.idVendor = USB_VENDER_ID_REALTEK, .idProduct = 0x8177, .flags = SPEC_DEV_ID_DISABLE_HT}, /* 8188cu 1*1 dongole, (b/g mode only) */
|
||||
|
@ -278,7 +279,7 @@ struct rtw_usb_drv {
|
|||
u8 hw_type;
|
||||
};
|
||||
|
||||
struct rtw_usb_drv usb_drv = {
|
||||
static struct rtw_usb_drv usb_drv = {
|
||||
.usbdrv.name = (char *)DRV_NAME,
|
||||
.usbdrv.probe = rtw_drv_init,
|
||||
.usbdrv.disconnect = rtw_dev_remove,
|
||||
|
@ -892,7 +893,7 @@ exit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
int rtw_resume_process(_adapter *padapter)
|
||||
static int rtw_resume_process(_adapter *padapter)
|
||||
{
|
||||
int ret, pm_cnt = 0;
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
|
@ -1141,9 +1142,9 @@ extern void rtd2885_wlan_netlink_sendMsg(char *action_string, char *name);
|
|||
* We accept the new device by returning 0.
|
||||
*/
|
||||
|
||||
_adapter *rtw_sw_export = NULL;
|
||||
static _adapter *rtw_sw_export = NULL;
|
||||
|
||||
_adapter *rtw_usb_primary_adapter_init(struct dvobj_priv *dvobj,
|
||||
static _adapter *rtw_usb_primary_adapter_init(struct dvobj_priv *dvobj,
|
||||
struct usb_interface *pusb_intf)
|
||||
{
|
||||
_adapter *padapter = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue