1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-13 01:22:14 +00:00

Merge pull request #147 from kimocoder/v5.2.20

V5.2.20
This commit is contained in:
Christian B 2018-07-02 22:11:11 +02:00 committed by GitHub
commit d21c2880eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 39 additions and 22 deletions

View File

@ -286,7 +286,7 @@ void rtw_ps_processor(_adapter *padapter)
ps_deny = rtw_ps_deny_get(padapter); ps_deny = rtw_ps_deny_get(padapter);
_exit_pwrlock(&adapter_to_pwrctl(padapter)->lock); _exit_pwrlock(&adapter_to_pwrctl(padapter)->lock);
if (ps_deny != 0) { if (ps_deny != 0) {
RTW_INFO(FUNC_ADPT_FMT ": ps_deny=0x%08X, skip power save!\n", RTW_DBG(FUNC_ADPT_FMT ": ps_deny=0x%08X, skip power save!\n",
FUNC_ADPT_ARG(padapter), ps_deny); FUNC_ADPT_ARG(padapter), ps_deny);
goto exit; goto exit;
} }

View File

@ -4394,6 +4394,8 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
pattrib->last_txcmdsz = pattrib->pktlen; pattrib->last_txcmdsz = pattrib->pktlen;
dump_mgntframe(padapter, pmgntframe); dump_mgntframe(padapter, pmgntframe);
DBG_COUNTER(padapter->tx_logs.core_tx); DBG_COUNTER(padapter->tx_logs.core_tx);
pxmitpriv->tx_pkts++;
pxmitpriv->tx_bytes += skb->len;
fail: fail:
rtw_skb_free(skb); rtw_skb_free(skb);

View File

@ -7190,6 +7190,9 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
#endif #endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0))
#if defined(CONFIG_NET_NS)
wiphy->flags |= WIPHY_FLAG_NETNS_OK;
#endif //CONFIG_NET_NS
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS; wiphy->flags |= WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS;
#endif #endif

View File

@ -12495,8 +12495,9 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev)
} }
#endif #endif
#ifdef CONFIG_WIRELESS_EXT #if defined(CONFIG_WIRELESS_EXT) && !defined(CONFIG_CFG80211_WEXT)
struct iw_handler_def rtw_handlers_def = { struct iw_handler_def rtw_handlers_def =
{
.standard = rtw_handlers, .standard = rtw_handlers,
.num_standard = sizeof(rtw_handlers) / sizeof(iw_handler), .num_standard = sizeof(rtw_handlers) / sizeof(iw_handler),
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)) || defined(CONFIG_WEXT_PRIV) #if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)) || defined(CONFIG_WEXT_PRIV)

View File

@ -1522,7 +1522,7 @@ struct net_device *rtw_init_netdev(_adapter *old_padapter)
/* pnetdev->tx_timeout = NULL; */ /* pnetdev->tx_timeout = NULL; */
pnetdev->watchdog_timeo = HZ * 3; /* 3 second timeout */ pnetdev->watchdog_timeo = HZ * 3; /* 3 second timeout */
#ifdef CONFIG_WIRELESS_EXT #if defined(CONFIG_WIRELESS_EXT) && !defined(CONFIG_CFG80211_WEXT)
pnetdev->wireless_handlers = (struct iw_handler_def *)&rtw_handlers_def; pnetdev->wireless_handlers = (struct iw_handler_def *)&rtw_handlers_def;
#endif #endif
@ -1605,6 +1605,9 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
rtw_init_netdev_name(ndev, name); rtw_init_netdev_name(ndev, name);
_rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN); _rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
#if defined(CONFIG_NET_NS)
dev_net_set(ndev, wiphy_net(adapter_to_wiphy(adapter)));
#endif //defined(CONFIG_NET_NS)
/* Tell the network stack we exist */ /* Tell the network stack we exist */

View File

@ -161,7 +161,7 @@ int rtw_ieee80211_radiotap_iterator_init(
return 0; return 0;
} }
EXPORT_SYMBOL(rtw_ieee80211_radiotap_iterator_init); //EXPORT_SYMBOL(rtw_ieee80211_radiotap_iterator_init);
static void find_ns(struct ieee80211_radiotap_iterator *iterator, static void find_ns(struct ieee80211_radiotap_iterator *iterator,
uint32_t oui, uint8_t subns) uint32_t oui, uint8_t subns)
@ -367,4 +367,4 @@ int rtw_ieee80211_radiotap_iterator_next(
return 0; return 0;
} }
} }
EXPORT_SYMBOL(rtw_ieee80211_radiotap_iterator_next); //EXPORT_SYMBOL(rtw_ieee80211_radiotap_iterator_next);

View File

@ -53,34 +53,36 @@ static struct country_code_to_enum_rd allCountries[] = {
/* 5G chan 36 - chan 64 */ /* 5G chan 36 - chan 64 */
#define RTW_5GHZ_5150_5350 \ #define RTW_5GHZ_5150_5350 \
REG_RULE(5150-10, 5350+10, 40, 0, 30, \ REG_RULE(5150-10, 5350+10, 80, 0, 30, \
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS) NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
/* 5G chan 100 - chan 165 */ /* 5G chan 100 - chan 165 */
#define RTW_5GHZ_5470_5850 \ #define RTW_5GHZ_5470_5850 \
REG_RULE(5470-10, 5850+10, 40, 0, 30, \ REG_RULE(5470-10, 5850+10, 80, 0, 30, \
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS) NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
/* 5G chan 149 - chan 165 */ /* 5G chan 149 - chan 165 */
#define RTW_5GHZ_5725_5850 \ #define RTW_5GHZ_5725_5850 \
REG_RULE(5725-10, 5850+10, 40, 0, 30, \ REG_RULE(5725-10, 5850+10, 80, 0, 30, \
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS) NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
/* 5G chan 36 - chan 165 */ /* 5G chan 36 - chan 165 */
#define RTW_5GHZ_5150_5850 \ #define RTW_5GHZ_5150_5850 \
REG_RULE(5150-10, 5850+10, 40, 0, 30, \ REG_RULE(5150-10, 5850+10, 80, 0, 30, \
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS) NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
static const struct ieee80211_regdomain rtw_regdom_rd = { static const struct ieee80211_regdomain rtw_regdom_rd = {
.n_reg_rules = 3, .n_reg_rules = 4,
.alpha2 = "99", .alpha2 = "99",
.reg_rules = { .reg_rules = {
RTW_2GHZ_CH01_11, RTW_2GHZ_CH01_11,
RTW_2GHZ_CH12_13, RTW_2GHZ_CH12_13,
RTW_2GHZ_CH14,
RTW_5GHZ_5150_5850, RTW_5GHZ_5150_5850,
} }
}; };
#if 0
static const struct ieee80211_regdomain rtw_regdom_11 = { static const struct ieee80211_regdomain rtw_regdom_11 = {
.n_reg_rules = 1, .n_reg_rules = 1,
.alpha2 = "99", .alpha2 = "99",
@ -138,7 +140,7 @@ static const struct ieee80211_regdomain rtw_regdom_14 = {
RTW_2GHZ_CH14, RTW_2GHZ_CH14,
} }
}; };
#endif
#if 0 #if 0
static struct rtw_regulatory *rtw_regd; static struct rtw_regulatory *rtw_regd;
#endif #endif
@ -310,16 +312,16 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy)
{ {
#if 1 /* by channel plan */ #if 1 /* by channel plan */
_adapter *padapter = wiphy_to_adapter(wiphy); _adapter *padapter = wiphy_to_adapter(wiphy);
struct rf_ctl_t *rfctl = adapter_to_rfctl(padapter); //struct rf_ctl_t *rfctl = adapter_to_rfctl(padapter);
u8 channel_plan = rfctl->ChannelPlan; //u8 channel_plan = rfctl->ChannelPlan;
RT_CHANNEL_INFO *channel_set = rfctl->channel_set; //RT_CHANNEL_INFO *channel_set = rfctl->channel_set;
u8 max_chan_nums = rfctl->max_chan_nums; //u8 max_chan_nums = rfctl->max_chan_nums;
struct ieee80211_supported_band *sband; struct ieee80211_supported_band *sband;
struct ieee80211_channel *ch; struct ieee80211_channel *ch;
unsigned int i, j; unsigned int i, j;
u16 channel; u16 channel;
u32 freq; //u32 freq;
/* all channels disable */ /* all channels disable */
for (i = 0; i < NUM_NL80211_BANDS; i++) { for (i = 0; i < NUM_NL80211_BANDS; i++) {
@ -330,12 +332,17 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy)
ch = &sband->channels[j]; ch = &sband->channels[j];
if (ch) if (ch)
ch->flags = IEEE80211_CHAN_DISABLED; ch->flags &= ~(IEEE80211_CHAN_DISABLED|IEEE80211_CHAN_NO_HT40PLUS|
IEEE80211_CHAN_NO_HT40MINUS|IEEE80211_CHAN_NO_80MHZ|
IEEE80211_CHAN_NO_160MHZ);
//ch->flags = IEEE80211_CHAN_DISABLED;
} }
} }
} }
/* channels apply by channel plans. */ /* channels apply by channel plans. */
/*
for (i = 0; i < max_chan_nums; i++) { for (i = 0; i < max_chan_nums; i++) {
channel = channel_set[i].ChannelNum; channel = channel_set[i].ChannelNum;
freq = rtw_ch2freq(channel); freq = rtw_ch2freq(channel);
@ -356,6 +363,7 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy)
ch->flags = 0; ch->flags = 0;
} }
} }
*/
#else #else
struct ieee80211_supported_band *sband; struct ieee80211_supported_band *sband;