mirror of
https://github.com/chinawrj/rtl8812au
synced 2024-11-28 08:04:25 +00:00
commit
d21c2880eb
@ -286,7 +286,7 @@ void rtw_ps_processor(_adapter *padapter)
|
||||
ps_deny = rtw_ps_deny_get(padapter);
|
||||
_exit_pwrlock(&adapter_to_pwrctl(padapter)->lock);
|
||||
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);
|
||||
goto exit;
|
||||
}
|
||||
|
@ -4394,6 +4394,8 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
|
||||
pattrib->last_txcmdsz = pattrib->pktlen;
|
||||
dump_mgntframe(padapter, pmgntframe);
|
||||
DBG_COUNTER(padapter->tx_logs.core_tx);
|
||||
pxmitpriv->tx_pkts++;
|
||||
pxmitpriv->tx_bytes += skb->len;
|
||||
|
||||
fail:
|
||||
rtw_skb_free(skb);
|
||||
|
@ -7190,6 +7190,9 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
|
||||
#endif
|
||||
|
||||
#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;
|
||||
#endif
|
||||
|
||||
|
@ -12495,8 +12495,9 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WIRELESS_EXT
|
||||
struct iw_handler_def rtw_handlers_def = {
|
||||
#if defined(CONFIG_WIRELESS_EXT) && !defined(CONFIG_CFG80211_WEXT)
|
||||
struct iw_handler_def rtw_handlers_def =
|
||||
{
|
||||
.standard = rtw_handlers,
|
||||
.num_standard = sizeof(rtw_handlers) / sizeof(iw_handler),
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)) || defined(CONFIG_WEXT_PRIV)
|
||||
|
@ -1522,7 +1522,7 @@ struct net_device *rtw_init_netdev(_adapter *old_padapter)
|
||||
/* pnetdev->tx_timeout = NULL; */
|
||||
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;
|
||||
#endif
|
||||
|
||||
@ -1605,6 +1605,9 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
|
||||
rtw_init_netdev_name(ndev, name);
|
||||
|
||||
_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 */
|
||||
|
||||
|
@ -161,7 +161,7 @@ int rtw_ieee80211_radiotap_iterator_init(
|
||||
|
||||
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,
|
||||
uint32_t oui, uint8_t subns)
|
||||
@ -367,4 +367,4 @@ int rtw_ieee80211_radiotap_iterator_next(
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(rtw_ieee80211_radiotap_iterator_next);
|
||||
//EXPORT_SYMBOL(rtw_ieee80211_radiotap_iterator_next);
|
||||
|
@ -53,34 +53,36 @@ static struct country_code_to_enum_rd allCountries[] = {
|
||||
|
||||
/* 5G chan 36 - chan 64 */
|
||||
#define RTW_5GHZ_5150_5350 \
|
||||
REG_RULE(5150-10, 5350+10, 40, 0, 30, \
|
||||
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
|
||||
REG_RULE(5150-10, 5350+10, 80, 0, 30, \
|
||||
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
|
||||
|
||||
/* 5G chan 100 - chan 165 */
|
||||
#define RTW_5GHZ_5470_5850 \
|
||||
REG_RULE(5470-10, 5850+10, 40, 0, 30, \
|
||||
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
|
||||
REG_RULE(5470-10, 5850+10, 80, 0, 30, \
|
||||
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
|
||||
|
||||
/* 5G chan 149 - chan 165 */
|
||||
#define RTW_5GHZ_5725_5850 \
|
||||
REG_RULE(5725-10, 5850+10, 40, 0, 30, \
|
||||
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
|
||||
REG_RULE(5725-10, 5850+10, 80, 0, 30, \
|
||||
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
|
||||
|
||||
/* 5G chan 36 - chan 165 */
|
||||
#define RTW_5GHZ_5150_5850 \
|
||||
REG_RULE(5150-10, 5850+10, 40, 0, 30, \
|
||||
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
|
||||
REG_RULE(5150-10, 5850+10, 80, 0, 30, \
|
||||
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
|
||||
|
||||
static const struct ieee80211_regdomain rtw_regdom_rd = {
|
||||
.n_reg_rules = 3,
|
||||
.n_reg_rules = 4,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
RTW_2GHZ_CH01_11,
|
||||
RTW_2GHZ_CH12_13,
|
||||
RTW_2GHZ_CH14,
|
||||
RTW_5GHZ_5150_5850,
|
||||
}
|
||||
};
|
||||
|
||||
#if 0
|
||||
static const struct ieee80211_regdomain rtw_regdom_11 = {
|
||||
.n_reg_rules = 1,
|
||||
.alpha2 = "99",
|
||||
@ -138,7 +140,7 @@ static const struct ieee80211_regdomain rtw_regdom_14 = {
|
||||
RTW_2GHZ_CH14,
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
#if 0
|
||||
static struct rtw_regulatory *rtw_regd;
|
||||
#endif
|
||||
@ -310,16 +312,16 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy)
|
||||
{
|
||||
#if 1 /* by channel plan */
|
||||
_adapter *padapter = wiphy_to_adapter(wiphy);
|
||||
struct rf_ctl_t *rfctl = adapter_to_rfctl(padapter);
|
||||
u8 channel_plan = rfctl->ChannelPlan;
|
||||
RT_CHANNEL_INFO *channel_set = rfctl->channel_set;
|
||||
u8 max_chan_nums = rfctl->max_chan_nums;
|
||||
//struct rf_ctl_t *rfctl = adapter_to_rfctl(padapter);
|
||||
//u8 channel_plan = rfctl->ChannelPlan;
|
||||
//RT_CHANNEL_INFO *channel_set = rfctl->channel_set;
|
||||
//u8 max_chan_nums = rfctl->max_chan_nums;
|
||||
|
||||
struct ieee80211_supported_band *sband;
|
||||
struct ieee80211_channel *ch;
|
||||
unsigned int i, j;
|
||||
u16 channel;
|
||||
u32 freq;
|
||||
//u32 freq;
|
||||
|
||||
/* all channels disable */
|
||||
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];
|
||||
|
||||
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. */
|
||||
|
||||
/*
|
||||
for (i = 0; i < max_chan_nums; i++) {
|
||||
channel = channel_set[i].ChannelNum;
|
||||
freq = rtw_ch2freq(channel);
|
||||
@ -356,6 +363,7 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy)
|
||||
ch->flags = 0;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#else
|
||||
struct ieee80211_supported_band *sband;
|
||||
|
Loading…
Reference in New Issue
Block a user