mirror of
https://github.com/breeze303/openwrt-ipq.git
synced 2025-12-18 05:11:06 +00:00
135 lines
4.6 KiB
Diff
135 lines
4.6 KiB
Diff
--- a/include/net/cfg80211.h
|
|
+++ b/include/net/cfg80211.h
|
|
@@ -9247,7 +9247,7 @@ void cfg80211_bss_flush(struct wiphy *wi
|
|
* @count: the number of TBTTs until the color change happens
|
|
* @color_bitmap: representations of the colors that the local BSS is aware of
|
|
*/
|
|
-int cfg80211_bss_color_notify(struct net_device *dev,
|
|
+int cfg80211_bss_color_notify(struct net_device *dev, gfp_t gfp,
|
|
enum nl80211_commands cmd, u8 count,
|
|
u64 color_bitmap);
|
|
|
|
@@ -9257,9 +9257,9 @@ int cfg80211_bss_color_notify(struct net
|
|
* @color_bitmap: representations of the colors that the local BSS is aware of
|
|
*/
|
|
static inline int cfg80211_obss_color_collision_notify(struct net_device *dev,
|
|
- u64 color_bitmap)
|
|
+ u64 color_bitmap, gfp_t gfp)
|
|
{
|
|
- return cfg80211_bss_color_notify(dev, NL80211_CMD_OBSS_COLOR_COLLISION,
|
|
+ return cfg80211_bss_color_notify(dev, gfp, NL80211_CMD_OBSS_COLOR_COLLISION,
|
|
0, color_bitmap);
|
|
}
|
|
|
|
@@ -9273,7 +9273,7 @@ static inline int cfg80211_obss_color_co
|
|
static inline int cfg80211_color_change_started_notify(struct net_device *dev,
|
|
u8 count)
|
|
{
|
|
- return cfg80211_bss_color_notify(dev, NL80211_CMD_COLOR_CHANGE_STARTED,
|
|
+ return cfg80211_bss_color_notify(dev, GFP_KERNEL, NL80211_CMD_COLOR_CHANGE_STARTED,
|
|
count, 0);
|
|
}
|
|
|
|
@@ -9285,7 +9285,7 @@ static inline int cfg80211_color_change_
|
|
*/
|
|
static inline int cfg80211_color_change_aborted_notify(struct net_device *dev)
|
|
{
|
|
- return cfg80211_bss_color_notify(dev, NL80211_CMD_COLOR_CHANGE_ABORTED,
|
|
+ return cfg80211_bss_color_notify(dev, GFP_KERNEL, NL80211_CMD_COLOR_CHANGE_ABORTED,
|
|
0, 0);
|
|
}
|
|
|
|
@@ -9297,7 +9297,7 @@ static inline int cfg80211_color_change_
|
|
*/
|
|
static inline int cfg80211_color_change_notify(struct net_device *dev)
|
|
{
|
|
- return cfg80211_bss_color_notify(dev,
|
|
+ return cfg80211_bss_color_notify(dev, GFP_KERNEL,
|
|
NL80211_CMD_COLOR_CHANGE_COMPLETED,
|
|
0, 0);
|
|
}
|
|
--- a/net/mac80211/cfg.c
|
|
+++ b/net/mac80211/cfg.c
|
|
@@ -4779,7 +4779,7 @@ void ieee80211_color_collision_detection
|
|
struct ieee80211_sub_if_data *sdata = link->sdata;
|
|
|
|
sdata_lock(sdata);
|
|
- cfg80211_obss_color_collision_notify(sdata->dev, link->color_bitmap);
|
|
+ cfg80211_obss_color_collision_notify(sdata->dev, link->color_bitmap, GFP_KERNEL);
|
|
sdata_unlock(sdata);
|
|
}
|
|
|
|
--- a/net/mac80211/debugfs_netdev.c
|
|
+++ b/net/mac80211/debugfs_netdev.c
|
|
@@ -889,7 +889,7 @@ void ieee80211_debugfs_add_netdev(struct
|
|
{
|
|
char buf[10+IFNAMSIZ];
|
|
|
|
- sprintf(buf, "netdev:%s", sdata->name);
|
|
+ snprintf(buf, 10 + IFNAMSIZ, "netdev:%s", sdata->name);
|
|
sdata->vif.debugfs_dir = debugfs_create_dir(buf,
|
|
sdata->local->hw.wiphy->debugfsdir);
|
|
sdata->debugfs.subdir_stations = debugfs_create_dir("stations",
|
|
--- a/net/mac80211/sta_info.c
|
|
+++ b/net/mac80211/sta_info.c
|
|
@@ -1414,18 +1414,6 @@ static void __sta_info_destroy_part2(str
|
|
WARN_ON_ONCE(ret);
|
|
}
|
|
|
|
- /* Flush queues before removing keys, as that might remove them
|
|
- * from hardware, and then depending on the offload method, any
|
|
- * frames sitting on hardware queues might be sent out without
|
|
- * any encryption at all.
|
|
- */
|
|
- if (local->ops->set_key) {
|
|
- if (local->ops->flush_sta)
|
|
- drv_flush_sta(local, sta->sdata, sta);
|
|
- else
|
|
- ieee80211_flush_queues(local, sta->sdata, false);
|
|
- }
|
|
-
|
|
/* now keys can no longer be reached */
|
|
ieee80211_free_sta_keys(local, sta);
|
|
|
|
--- a/net/wireless/nl80211.c
|
|
+++ b/net/wireless/nl80211.c
|
|
@@ -19484,7 +19484,7 @@ void cfg80211_ch_switch_started_notify(s
|
|
}
|
|
EXPORT_SYMBOL(cfg80211_ch_switch_started_notify);
|
|
|
|
-int cfg80211_bss_color_notify(struct net_device *dev,
|
|
+int cfg80211_bss_color_notify(struct net_device *dev, gfp_t gfp,
|
|
enum nl80211_commands cmd, u8 count,
|
|
u64 color_bitmap)
|
|
{
|
|
@@ -19498,7 +19498,7 @@ int cfg80211_bss_color_notify(struct net
|
|
|
|
trace_cfg80211_bss_color_notify(dev, cmd, count, color_bitmap);
|
|
|
|
- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
|
|
+ msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
|
|
if (!msg)
|
|
return -ENOMEM;
|
|
|
|
@@ -19521,7 +19521,7 @@ int cfg80211_bss_color_notify(struct net
|
|
genlmsg_end(msg, hdr);
|
|
|
|
return genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy),
|
|
- msg, 0, NL80211_MCGRP_MLME, GFP_KERNEL);
|
|
+ msg, 0, NL80211_MCGRP_MLME, gfp);
|
|
|
|
nla_put_failure:
|
|
nlmsg_free(msg);
|
|
--- a/backport-include/linux/netdevice.h
|
|
+++ b/backport-include/linux/netdevice.h
|
|
@@ -70,6 +70,9 @@ static inline void netif_trans_update(st
|
|
(_dev)->needs_free_netdev = true;
|
|
#endif
|
|
|
|
+#define netdev_tstats(dev) dev->tstats
|
|
+#define netdev_assign_tstats(dev, e) dev->tstats = (e);
|
|
+
|
|
#if LINUX_VERSION_IS_LESS(4,15,0)
|
|
static inline int _bp_netdev_upper_dev_link(struct net_device *dev,
|
|
struct net_device *upper_dev)
|