diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index 0bb4d76..b460da7 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -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; } diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index d1a0053..e2ea602 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -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); diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 9cbd901..e2fa44e 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -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 diff --git a/os_dep/linux/ioctl_linux.c b/os_dep/linux/ioctl_linux.c index 172da1a..e6abac2 100644 --- a/os_dep/linux/ioctl_linux.c +++ b/os_dep/linux/ioctl_linux.c @@ -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) diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index ccba940..d732019 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -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 */ diff --git a/os_dep/linux/rtw_radiotap.c b/os_dep/linux/rtw_radiotap.c index f2c9218..49f6aa5 100644 --- a/os_dep/linux/rtw_radiotap.c +++ b/os_dep/linux/rtw_radiotap.c @@ -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); \ No newline at end of file +//EXPORT_SYMBOL(rtw_ieee80211_radiotap_iterator_next); diff --git a/os_dep/linux/wifi_regd.c b/os_dep/linux/wifi_regd.c index 73025cc..796d27b 100644 --- a/os_dep/linux/wifi_regd.c +++ b/os_dep/linux/wifi_regd.c @@ -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;