|
@@ -11653,7 +11653,9 @@ EXPORT_SYMBOL(cfg80211_pmksa_candidate_notify);
|
|
|
static void nl80211_ch_switch_notify(struct cfg80211_registered_device *rdev,
|
|
static void nl80211_ch_switch_notify(struct cfg80211_registered_device *rdev,
|
|
|
struct net_device *netdev,
|
|
struct net_device *netdev,
|
|
|
struct cfg80211_chan_def *chandef,
|
|
struct cfg80211_chan_def *chandef,
|
|
|
- gfp_t gfp)
|
|
|
|
|
|
|
+ gfp_t gfp,
|
|
|
|
|
+ enum nl80211_commands notif,
|
|
|
|
|
+ u8 count)
|
|
|
{
|
|
{
|
|
|
struct sk_buff *msg;
|
|
struct sk_buff *msg;
|
|
|
void *hdr;
|
|
void *hdr;
|
|
@@ -11662,7 +11664,7 @@ static void nl80211_ch_switch_notify(struct cfg80211_registered_device *rdev,
|
|
|
if (!msg)
|
|
if (!msg)
|
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
- hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_CH_SWITCH_NOTIFY);
|
|
|
|
|
|
|
+ hdr = nl80211hdr_put(msg, 0, 0, 0, notif);
|
|
|
if (!hdr) {
|
|
if (!hdr) {
|
|
|
nlmsg_free(msg);
|
|
nlmsg_free(msg);
|
|
|
return;
|
|
return;
|
|
@@ -11674,6 +11676,10 @@ static void nl80211_ch_switch_notify(struct cfg80211_registered_device *rdev,
|
|
|
if (nl80211_send_chandef(msg, chandef))
|
|
if (nl80211_send_chandef(msg, chandef))
|
|
|
goto nla_put_failure;
|
|
goto nla_put_failure;
|
|
|
|
|
|
|
|
|
|
+ if ((notif == NL80211_CMD_CH_SWITCH_STARTED_NOTIFY) &&
|
|
|
|
|
+ (nla_put_u32(msg, NL80211_ATTR_CH_SWITCH_COUNT, count)))
|
|
|
|
|
+ goto nla_put_failure;
|
|
|
|
|
+
|
|
|
genlmsg_end(msg, hdr);
|
|
genlmsg_end(msg, hdr);
|
|
|
|
|
|
|
|
genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0,
|
|
genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0,
|
|
@@ -11704,10 +11710,26 @@ void cfg80211_ch_switch_notify(struct net_device *dev,
|
|
|
|
|
|
|
|
wdev->chandef = *chandef;
|
|
wdev->chandef = *chandef;
|
|
|
wdev->preset_chandef = *chandef;
|
|
wdev->preset_chandef = *chandef;
|
|
|
- nl80211_ch_switch_notify(rdev, dev, chandef, GFP_KERNEL);
|
|
|
|
|
|
|
+ nl80211_ch_switch_notify(rdev, dev, chandef, GFP_KERNEL,
|
|
|
|
|
+ NL80211_CMD_CH_SWITCH_NOTIFY, 0);
|
|
|
}
|
|
}
|
|
|
EXPORT_SYMBOL(cfg80211_ch_switch_notify);
|
|
EXPORT_SYMBOL(cfg80211_ch_switch_notify);
|
|
|
|
|
|
|
|
|
|
+void cfg80211_ch_switch_started_notify(struct net_device *dev,
|
|
|
|
|
+ struct cfg80211_chan_def *chandef,
|
|
|
|
|
+ u8 count)
|
|
|
|
|
+{
|
|
|
|
|
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
|
|
|
|
|
+ struct wiphy *wiphy = wdev->wiphy;
|
|
|
|
|
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
|
|
|
|
|
+
|
|
|
|
|
+ trace_cfg80211_ch_switch_started_notify(dev, chandef);
|
|
|
|
|
+
|
|
|
|
|
+ nl80211_ch_switch_notify(rdev, dev, chandef, GFP_KERNEL,
|
|
|
|
|
+ NL80211_CMD_CH_SWITCH_STARTED_NOTIFY, count);
|
|
|
|
|
+}
|
|
|
|
|
+EXPORT_SYMBOL(cfg80211_ch_switch_started_notify);
|
|
|
|
|
+
|
|
|
void cfg80211_cqm_txe_notify(struct net_device *dev,
|
|
void cfg80211_cqm_txe_notify(struct net_device *dev,
|
|
|
const u8 *peer, u32 num_packets,
|
|
const u8 *peer, u32 num_packets,
|
|
|
u32 rate, u32 intvl, gfp_t gfp)
|
|
u32 rate, u32 intvl, gfp_t gfp)
|