aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>2013-08-15 07:51:28 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-08-23 10:06:03 -0400
commit19504cf5f35fbe85db811fce9f4392a0cbdada2f (patch)
tree29e8eaeb1a062cb3e843781c7dc4add821fd592b /net/wireless
parentc4c205f3cd17b567b8e20098522416eac2e73960 (diff)
cfg80211: add flags to cfg80211_rx_mgmt()
Add flags intended to report various auxiliary information and introduce the NL80211_RXMGMT_FLAG_ANSWERED flag to report that the frame was already answered by the device. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> [REPLIED->ANSWERED, reword commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/mlme.c4
-rw-r--r--net/wireless/nl80211.c6
-rw-r--r--net/wireless/nl80211.h2
3 files changed, 7 insertions, 5 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index bfac5e186f57..8d49c1ce3dea 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -621,7 +621,7 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
621} 621}
622 622
623bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm, 623bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm,
624 const u8 *buf, size_t len, gfp_t gfp) 624 const u8 *buf, size_t len, u32 flags, gfp_t gfp)
625{ 625{
626 struct wiphy *wiphy = wdev->wiphy; 626 struct wiphy *wiphy = wdev->wiphy;
627 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 627 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
@@ -664,7 +664,7 @@ bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm,
664 /* Indicate the received Action frame to user space */ 664 /* Indicate the received Action frame to user space */
665 if (nl80211_send_mgmt(rdev, wdev, reg->nlportid, 665 if (nl80211_send_mgmt(rdev, wdev, reg->nlportid,
666 freq, sig_mbm, 666 freq, sig_mbm,
667 buf, len, gfp)) 667 buf, len, flags, gfp))
668 continue; 668 continue;
669 669
670 result = true; 670 result = true;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 334697de5cc0..a51269d2d488 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -10446,7 +10446,7 @@ EXPORT_SYMBOL(cfg80211_rx_unexpected_4addr_frame);
10446int nl80211_send_mgmt(struct cfg80211_registered_device *rdev, 10446int nl80211_send_mgmt(struct cfg80211_registered_device *rdev,
10447 struct wireless_dev *wdev, u32 nlportid, 10447 struct wireless_dev *wdev, u32 nlportid,
10448 int freq, int sig_dbm, 10448 int freq, int sig_dbm,
10449 const u8 *buf, size_t len, gfp_t gfp) 10449 const u8 *buf, size_t len, u32 flags, gfp_t gfp)
10450{ 10450{
10451 struct net_device *netdev = wdev->netdev; 10451 struct net_device *netdev = wdev->netdev;
10452 struct sk_buff *msg; 10452 struct sk_buff *msg;
@@ -10469,7 +10469,9 @@ int nl80211_send_mgmt(struct cfg80211_registered_device *rdev,
10469 nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq) || 10469 nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq) ||
10470 (sig_dbm && 10470 (sig_dbm &&
10471 nla_put_u32(msg, NL80211_ATTR_RX_SIGNAL_DBM, sig_dbm)) || 10471 nla_put_u32(msg, NL80211_ATTR_RX_SIGNAL_DBM, sig_dbm)) ||
10472 nla_put(msg, NL80211_ATTR_FRAME, len, buf)) 10472 nla_put(msg, NL80211_ATTR_FRAME, len, buf) ||
10473 (flags &&
10474 nla_put_u32(msg, NL80211_ATTR_RXMGMT_FLAGS, flags)))
10473 goto nla_put_failure; 10475 goto nla_put_failure;
10474 10476
10475 genlmsg_end(msg, hdr); 10477 genlmsg_end(msg, hdr);
diff --git a/net/wireless/nl80211.h b/net/wireless/nl80211.h
index 44341bf53cfc..2c0f2b3c07cb 100644
--- a/net/wireless/nl80211.h
+++ b/net/wireless/nl80211.h
@@ -66,7 +66,7 @@ void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev,
66int nl80211_send_mgmt(struct cfg80211_registered_device *rdev, 66int nl80211_send_mgmt(struct cfg80211_registered_device *rdev,
67 struct wireless_dev *wdev, u32 nlpid, 67 struct wireless_dev *wdev, u32 nlpid,
68 int freq, int sig_dbm, 68 int freq, int sig_dbm,
69 const u8 *buf, size_t len, gfp_t gfp); 69 const u8 *buf, size_t len, u32 flags, gfp_t gfp);
70 70
71void 71void
72nl80211_radar_notify(struct cfg80211_registered_device *rdev, 72nl80211_radar_notify(struct cfg80211_registered_device *rdev,