aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c51
1 files changed, 2 insertions, 49 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index d587ad284b3d..9c21ebf9780e 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -729,6 +729,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
729 dev->ethtool_ops = &cfg80211_ethtool_ops; 729 dev->ethtool_ops = &cfg80211_ethtool_ops;
730 730
731 if ((wdev->iftype == NL80211_IFTYPE_STATION || 731 if ((wdev->iftype == NL80211_IFTYPE_STATION ||
732 wdev->iftype == NL80211_IFTYPE_P2P_CLIENT ||
732 wdev->iftype == NL80211_IFTYPE_ADHOC) && !wdev->use_4addr) 733 wdev->iftype == NL80211_IFTYPE_ADHOC) && !wdev->use_4addr)
733 dev->priv_flags |= IFF_DONT_BRIDGE; 734 dev->priv_flags |= IFF_DONT_BRIDGE;
734 break; 735 break;
@@ -737,6 +738,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
737 case NL80211_IFTYPE_ADHOC: 738 case NL80211_IFTYPE_ADHOC:
738 cfg80211_leave_ibss(rdev, dev, true); 739 cfg80211_leave_ibss(rdev, dev, true);
739 break; 740 break;
741 case NL80211_IFTYPE_P2P_CLIENT:
740 case NL80211_IFTYPE_STATION: 742 case NL80211_IFTYPE_STATION:
741 wdev_lock(wdev); 743 wdev_lock(wdev);
742#ifdef CONFIG_CFG80211_WEXT 744#ifdef CONFIG_CFG80211_WEXT
@@ -915,52 +917,3 @@ static void __exit cfg80211_exit(void)
915 destroy_workqueue(cfg80211_wq); 917 destroy_workqueue(cfg80211_wq);
916} 918}
917module_exit(cfg80211_exit); 919module_exit(cfg80211_exit);
918
919static int ___wiphy_printk(const char *level, const struct wiphy *wiphy,
920 struct va_format *vaf)
921{
922 if (!wiphy)
923 return printk("%s(NULL wiphy *): %pV", level, vaf);
924
925 return printk("%s%s: %pV", level, wiphy_name(wiphy), vaf);
926}
927
928int __wiphy_printk(const char *level, const struct wiphy *wiphy,
929 const char *fmt, ...)
930{
931 struct va_format vaf;
932 va_list args;
933 int r;
934
935 va_start(args, fmt);
936
937 vaf.fmt = fmt;
938 vaf.va = &args;
939
940 r = ___wiphy_printk(level, wiphy, &vaf);
941 va_end(args);
942
943 return r;
944}
945EXPORT_SYMBOL(__wiphy_printk);
946
947#define define_wiphy_printk_level(func, kern_level) \
948int func(const struct wiphy *wiphy, const char *fmt, ...) \
949{ \
950 struct va_format vaf; \
951 va_list args; \
952 int r; \
953 \
954 va_start(args, fmt); \
955 \
956 vaf.fmt = fmt; \
957 vaf.va = &args; \
958 \
959 r = ___wiphy_printk(kern_level, wiphy, &vaf); \
960 va_end(args); \
961 \
962 return r; \
963} \
964EXPORT_SYMBOL(func);
965
966define_wiphy_printk_level(wiphy_debug, KERN_DEBUG);