Commit 953ba0a6 authored by David S. Miller's avatar David S. Miller

Merge tag 'mac80211-for-davem-2019-07-20' of...

Merge tag 'mac80211-for-davem-2019-07-20' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211

Johannes Berg says:

====================
We have a handful of fixes:
 * ignore bad CW parameters if we aren't using them,
   instead of warning
 * fix operation (and then build) with the new netlink vendor
   command policy requirement
 * fix a memory leak in an error path when setting beacons
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 1a03bb53 d2b3fe42
...@@ -177,6 +177,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = { ...@@ -177,6 +177,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_DMG_RF_GET_SECTOR_CFG, .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_DMG_RF_GET_SECTOR_CFG,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | .flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING, WIPHY_VENDOR_CMD_NEED_RUNNING,
.policy = wil_rf_sector_policy,
.doit = wil_rf_sector_get_cfg .doit = wil_rf_sector_get_cfg
}, },
{ {
...@@ -184,6 +185,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = { ...@@ -184,6 +185,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_DMG_RF_SET_SECTOR_CFG, .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_DMG_RF_SET_SECTOR_CFG,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | .flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING, WIPHY_VENDOR_CMD_NEED_RUNNING,
.policy = wil_rf_sector_policy,
.doit = wil_rf_sector_set_cfg .doit = wil_rf_sector_set_cfg
}, },
{ {
...@@ -192,6 +194,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = { ...@@ -192,6 +194,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
QCA_NL80211_VENDOR_SUBCMD_DMG_RF_GET_SELECTED_SECTOR, QCA_NL80211_VENDOR_SUBCMD_DMG_RF_GET_SELECTED_SECTOR,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | .flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING, WIPHY_VENDOR_CMD_NEED_RUNNING,
.policy = wil_rf_sector_policy,
.doit = wil_rf_sector_get_selected .doit = wil_rf_sector_get_selected
}, },
{ {
...@@ -200,6 +203,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = { ...@@ -200,6 +203,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
QCA_NL80211_VENDOR_SUBCMD_DMG_RF_SET_SELECTED_SECTOR, QCA_NL80211_VENDOR_SUBCMD_DMG_RF_SET_SELECTED_SECTOR,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | .flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING, WIPHY_VENDOR_CMD_NEED_RUNNING,
.policy = wil_rf_sector_policy,
.doit = wil_rf_sector_set_selected .doit = wil_rf_sector_set_selected
}, },
}; };
......
...@@ -112,6 +112,7 @@ const struct wiphy_vendor_command brcmf_vendor_cmds[] = { ...@@ -112,6 +112,7 @@ const struct wiphy_vendor_command brcmf_vendor_cmds[] = {
}, },
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | .flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV, WIPHY_VENDOR_CMD_NEED_NETDEV,
.policy = VENDOR_CMD_RAW_DATA,
.doit = brcmf_cfg80211_vndr_cmds_dcmd_handler .doit = brcmf_cfg80211_vndr_cmds_dcmd_handler
}, },
}; };
...@@ -163,6 +163,7 @@ static const struct wiphy_vendor_command wlcore_vendor_commands[] = { ...@@ -163,6 +163,7 @@ static const struct wiphy_vendor_command wlcore_vendor_commands[] = {
.flags = WIPHY_VENDOR_CMD_NEED_NETDEV | .flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING, WIPHY_VENDOR_CMD_NEED_RUNNING,
.doit = wlcore_vendor_cmd_smart_config_start, .doit = wlcore_vendor_cmd_smart_config_start,
.policy = wlcore_vendor_attr_policy,
}, },
{ {
.info = { .info = {
...@@ -172,6 +173,7 @@ static const struct wiphy_vendor_command wlcore_vendor_commands[] = { ...@@ -172,6 +173,7 @@ static const struct wiphy_vendor_command wlcore_vendor_commands[] = {
.flags = WIPHY_VENDOR_CMD_NEED_NETDEV | .flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING, WIPHY_VENDOR_CMD_NEED_RUNNING,
.doit = wlcore_vendor_cmd_smart_config_stop, .doit = wlcore_vendor_cmd_smart_config_stop,
.policy = wlcore_vendor_attr_policy,
}, },
{ {
.info = { .info = {
...@@ -181,6 +183,7 @@ static const struct wiphy_vendor_command wlcore_vendor_commands[] = { ...@@ -181,6 +183,7 @@ static const struct wiphy_vendor_command wlcore_vendor_commands[] = {
.flags = WIPHY_VENDOR_CMD_NEED_NETDEV | .flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING, WIPHY_VENDOR_CMD_NEED_RUNNING,
.doit = wlcore_vendor_cmd_smart_config_set_group_key, .doit = wlcore_vendor_cmd_smart_config_set_group_key,
.policy = wlcore_vendor_attr_policy,
}, },
}; };
......
...@@ -4170,7 +4170,7 @@ struct sta_opmode_info { ...@@ -4170,7 +4170,7 @@ struct sta_opmode_info {
u8 rx_nss; u8 rx_nss;
}; };
#define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)ERR_PTR(-ENODATA)) #define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)(long)(-ENODATA))
/** /**
* struct wiphy_vendor_command - vendor command definition * struct wiphy_vendor_command - vendor command definition
......
...@@ -2863,7 +2863,7 @@ enum nl80211_attrs { ...@@ -2863,7 +2863,7 @@ enum nl80211_attrs {
#define NL80211_HT_CAPABILITY_LEN 26 #define NL80211_HT_CAPABILITY_LEN 26
#define NL80211_VHT_CAPABILITY_LEN 12 #define NL80211_VHT_CAPABILITY_LEN 12
#define NL80211_HE_MIN_CAPABILITY_LEN 16 #define NL80211_HE_MIN_CAPABILITY_LEN 16
#define NL80211_HE_MAX_CAPABILITY_LEN 51 #define NL80211_HE_MAX_CAPABILITY_LEN 54
#define NL80211_MAX_NR_CIPHER_SUITES 5 #define NL80211_MAX_NR_CIPHER_SUITES 5
#define NL80211_MAX_NR_AKM_SUITES 2 #define NL80211_MAX_NR_AKM_SUITES 2
......
...@@ -936,8 +936,10 @@ static int ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata, ...@@ -936,8 +936,10 @@ static int ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
err = ieee80211_set_probe_resp(sdata, params->probe_resp, err = ieee80211_set_probe_resp(sdata, params->probe_resp,
params->probe_resp_len, csa); params->probe_resp_len, csa);
if (err < 0) if (err < 0) {
kfree(new);
return err; return err;
}
if (err == 0) if (err == 0)
changed |= BSS_CHANGED_AP_PROBE_RESP; changed |= BSS_CHANGED_AP_PROBE_RESP;
...@@ -949,8 +951,10 @@ static int ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata, ...@@ -949,8 +951,10 @@ static int ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
params->civicloc, params->civicloc,
params->civicloc_len); params->civicloc_len);
if (err < 0) if (err < 0) {
kfree(new);
return err; return err;
}
changed |= BSS_CHANGED_FTM_RESPONDER; changed |= BSS_CHANGED_FTM_RESPONDER;
} }
......
...@@ -187,11 +187,16 @@ int drv_conf_tx(struct ieee80211_local *local, ...@@ -187,11 +187,16 @@ int drv_conf_tx(struct ieee80211_local *local,
if (!check_sdata_in_driver(sdata)) if (!check_sdata_in_driver(sdata))
return -EIO; return -EIO;
if (WARN_ONCE(params->cw_min == 0 || if (params->cw_min == 0 || params->cw_min > params->cw_max) {
params->cw_min > params->cw_max, /*
* If we can't configure hardware anyway, don't warn. We may
* never have initialized the CW parameters.
*/
WARN_ONCE(local->ops->conf_tx,
"%s: invalid CW_min/CW_max: %d/%d\n", "%s: invalid CW_min/CW_max: %d/%d\n",
sdata->name, params->cw_min, params->cw_max)) sdata->name, params->cw_min, params->cw_max);
return -EINVAL; return -EINVAL;
}
trace_drv_conf_tx(local, sdata, ac, params); trace_drv_conf_tx(local, sdata, ac, params);
if (local->ops->conf_tx) if (local->ops->conf_tx)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment