diff options
author | David S. Miller <davem@davemloft.net> | 2017-03-01 18:08:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-01 18:08:34 -0500 |
commit | 16c54ac903042aca583e51a40bbe2f5503fe53c7 (patch) | |
tree | eabbc103ecce041108419e5af1c46fe652162488 /drivers | |
parent | 449809a66c1d0b1563dee84493e14bf3104d2d7e (diff) | |
parent | 19d19e960598161be92a7e4828eb7706c6410ce6 (diff) |
Merge tag 'mac80211-for-davem-2017-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg says:
====================
First round of fixes - details in the commits:
* use a valid hrtimer clock ID in mac80211_hwsim
* don't reorder frames prior to BA session
* flush a delayed work at suspend so the state is all valid before
suspend/resume
* fix packet statistics in fast-RX, the RX packets
counter increment was simply missing
* don't try to re-transmit filtered frames in an aggregation session
* shorten (for tracing) a debug message
* typo fix in another debug message
* fix nul-termination with HWSIM_ATTR_RADIO_NAME in hwsim
* fix mgmt RX processing when station is looked up by driver/device
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 0889fc81ce9e..50c219fb1a52 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -3056,6 +3056,7 @@ static int hwsim_register_received_nl(struct sk_buff *skb_2, | |||
3056 | static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info) | 3056 | static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info) |
3057 | { | 3057 | { |
3058 | struct hwsim_new_radio_params param = { 0 }; | 3058 | struct hwsim_new_radio_params param = { 0 }; |
3059 | const char *hwname = NULL; | ||
3059 | 3060 | ||
3060 | param.reg_strict = info->attrs[HWSIM_ATTR_REG_STRICT_REG]; | 3061 | param.reg_strict = info->attrs[HWSIM_ATTR_REG_STRICT_REG]; |
3061 | param.p2p_device = info->attrs[HWSIM_ATTR_SUPPORT_P2P_DEVICE]; | 3062 | param.p2p_device = info->attrs[HWSIM_ATTR_SUPPORT_P2P_DEVICE]; |
@@ -3069,8 +3070,14 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info) | |||
3069 | if (info->attrs[HWSIM_ATTR_NO_VIF]) | 3070 | if (info->attrs[HWSIM_ATTR_NO_VIF]) |
3070 | param.no_vif = true; | 3071 | param.no_vif = true; |
3071 | 3072 | ||
3072 | if (info->attrs[HWSIM_ATTR_RADIO_NAME]) | 3073 | if (info->attrs[HWSIM_ATTR_RADIO_NAME]) { |
3073 | param.hwname = nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME]); | 3074 | hwname = kasprintf(GFP_KERNEL, "%.*s", |
3075 | nla_len(info->attrs[HWSIM_ATTR_RADIO_NAME]), | ||
3076 | (char *)nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME])); | ||
3077 | if (!hwname) | ||
3078 | return -ENOMEM; | ||
3079 | param.hwname = hwname; | ||
3080 | } | ||
3074 | 3081 | ||
3075 | if (info->attrs[HWSIM_ATTR_USE_CHANCTX]) | 3082 | if (info->attrs[HWSIM_ATTR_USE_CHANCTX]) |
3076 | param.use_chanctx = true; | 3083 | param.use_chanctx = true; |
@@ -3098,11 +3105,15 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info) | |||
3098 | s64 idx = -1; | 3105 | s64 idx = -1; |
3099 | const char *hwname = NULL; | 3106 | const char *hwname = NULL; |
3100 | 3107 | ||
3101 | if (info->attrs[HWSIM_ATTR_RADIO_ID]) | 3108 | if (info->attrs[HWSIM_ATTR_RADIO_ID]) { |
3102 | idx = nla_get_u32(info->attrs[HWSIM_ATTR_RADIO_ID]); | 3109 | idx = nla_get_u32(info->attrs[HWSIM_ATTR_RADIO_ID]); |
3103 | else if (info->attrs[HWSIM_ATTR_RADIO_NAME]) | 3110 | } else if (info->attrs[HWSIM_ATTR_RADIO_NAME]) { |
3104 | hwname = (void *)nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME]); | 3111 | hwname = kasprintf(GFP_KERNEL, "%.*s", |
3105 | else | 3112 | nla_len(info->attrs[HWSIM_ATTR_RADIO_NAME]), |
3113 | (char *)nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME])); | ||
3114 | if (!hwname) | ||
3115 | return -ENOMEM; | ||
3116 | } else | ||
3106 | return -EINVAL; | 3117 | return -EINVAL; |
3107 | 3118 | ||
3108 | spin_lock_bh(&hwsim_radio_lock); | 3119 | spin_lock_bh(&hwsim_radio_lock); |
@@ -3111,7 +3122,8 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info) | |||
3111 | if (data->idx != idx) | 3122 | if (data->idx != idx) |
3112 | continue; | 3123 | continue; |
3113 | } else { | 3124 | } else { |
3114 | if (strcmp(hwname, wiphy_name(data->hw->wiphy))) | 3125 | if (!hwname || |
3126 | strcmp(hwname, wiphy_name(data->hw->wiphy))) | ||
3115 | continue; | 3127 | continue; |
3116 | } | 3128 | } |
3117 | 3129 | ||
@@ -3122,10 +3134,12 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info) | |||
3122 | spin_unlock_bh(&hwsim_radio_lock); | 3134 | spin_unlock_bh(&hwsim_radio_lock); |
3123 | mac80211_hwsim_del_radio(data, wiphy_name(data->hw->wiphy), | 3135 | mac80211_hwsim_del_radio(data, wiphy_name(data->hw->wiphy), |
3124 | info); | 3136 | info); |
3137 | kfree(hwname); | ||
3125 | return 0; | 3138 | return 0; |
3126 | } | 3139 | } |
3127 | spin_unlock_bh(&hwsim_radio_lock); | 3140 | spin_unlock_bh(&hwsim_radio_lock); |
3128 | 3141 | ||
3142 | kfree(hwname); | ||
3129 | return -ENODEV; | 3143 | return -ENODEV; |
3130 | } | 3144 | } |
3131 | 3145 | ||