summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorNakul Kachhwaha <nkachh@codeaurora.org>2017-02-28 11:47:01 +0530
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:31:49 +0800
commit7101e4fa0306146f46353f6dca0f4d4595c6ee1e (patch)
treeeeb18a0079685182215d859ddf8682c83c92f505 /include/net
parenta8d4da3f1417bf4290e8be247e87543f16b4063d (diff)
MLK-17362-01 Changes for wireless and cfg80211 support
[Patch] Pulling the following commits and some general changes from custom v3.10 kernel for supporting qcacld2.0 on kernel v4.9.11. 1. cfg80211: Using new wiphy flag WIPHY_FLAG_DFS_OFFLOAD When flag WIPHY_FLAG_DFS_OFFLOAD is defined, the driver would handle all the DFS related operations. Therefore the kernel needs to ignore the DFS state that it uses to block the userspace calls to the driver through cfg80211 APIs. Also it should treat the userspace calls to start radar detection as a no-op. Please note that changes in util.c is not picked up explicitly. Kernel v4.9.11 uses wrapper cfg80211_get_chans_dfs_required which takes care of this change. Change-Id: I9dd2076945581ca67e54dfc96dd3dbc526c6f0a2 IRs-Fixed: 202686 2. New db.txt from git/sforshee/wireless-regdb.git CONFIG_CFG80211_INTERNAL_REGDB is enabled in build. This causes kernel warn messages as db.txt is empty. A new db.txt is added from: git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git IRs-Fixed: 202686 3. Picked up the declaration and definition of the function cfg80211_is_gratuitous_arp_unsolicited_na Change-Id: I1e4083a2327c121073226aa6b75bb6b5b97cec00 CRs-fixed: 1079453 Signed-off-by: Nakul Kachhwaha <nkachh@codeaurora.org> Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cfg80211.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index ea0ed58db97e..61eb2ec3d79a 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3277,6 +3277,7 @@ enum wiphy_flags {
WIPHY_FLAG_SUPPORTS_5_10_MHZ = BIT(22),
WIPHY_FLAG_HAS_CHANNEL_SWITCH = BIT(23),
WIPHY_FLAG_HAS_STATIC_WEP = BIT(24),
+ WIPHY_FLAG_DFS_OFFLOAD = BIT(25)
};
/**
@@ -4513,6 +4514,32 @@ const u8 *cfg80211_find_vendor_ie(unsigned int oui, int oui_type,
int regulatory_hint(struct wiphy *wiphy, const char *alpha2);
/**
+ * regulatory_hint_user - hint to the wireless core a regulatory domain
+ * which the driver has received from an application
+ * @alpha2: the ISO/IEC 3166 alpha2 the driver claims its regulatory domain
+ * should be in. If @rd is set this should be NULL. Note that if you
+ * set this to NULL you should still set rd->alpha2 to some accepted
+ * alpha2.
+ * @user_reg_hint_type: the type of user regulatory hint.
+ *
+ * Wireless drivers can use this function to hint to the wireless core
+ * the current regulatory domain as specified by trusted applications,
+ * it is the driver's responsibilty to estbalish which applications it
+ * trusts.
+ *
+ * The wiphy should be registered to cfg80211 prior to this call.
+ * For cfg80211 drivers this means you must first use wiphy_register(),
+ * for mac80211 drivers you must first use ieee80211_register_hw().
+ *
+ * Drivers should check the return value, its possible you can get
+ * an -ENOMEM or an -EINVAL.
+ *
+ * Return: 0 on success. -ENOMEM, -EINVAL.
+ */
+int regulatory_hint_user(const char *alpha2,
+ enum nl80211_user_reg_hint_type user_reg_hint_type);
+
+/**
* regulatory_set_wiphy_regd - set regdom info for self managed drivers
* @wiphy: the wireless device we want to process the regulatory domain on
* @rd: the regulatory domain informatoin to use for this wiphy
@@ -6188,6 +6215,16 @@ void cfg80211_nan_func_terminated(struct wireless_dev *wdev,
/* ethtool helper */
void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info);
+/**
+ * cfg80211_is_gratuitous_arp_unsolicited_na - packet is grat. ARP/unsol. NA
+ * @skb: the input packet, must be an ethernet frame already
+ *
+ * Return: %true if the packet is a gratuitous ARP or unsolicited NA packet.
+ * This is used to drop packets that shouldn't occur because the AP implements
+ * a proxy service.
+ */
+bool cfg80211_is_gratuitous_arp_unsolicited_na(struct sk_buff *skb);
+
/* Logging, debugging and troubleshooting/diagnostic helpers. */
/* wiphy_printk helpers, similar to dev_printk */