Commit 0528e0fd authored by Andrei Otcheretianski's avatar Andrei Otcheretianski Committed by Johannes Berg

wifi: mac80211: Replace ENOTSUPP with EOPNOTSUPP

ENOTSUP isn't a standard error code. EOPNOTSUPP should be used instead.
Signed-off-by: default avatarAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20231211085121.3841b71c867d.Idf2ad01d9dfe8d6d6c352bf02deb06e49701ad1d@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 42b941cd
...@@ -1270,7 +1270,7 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, ...@@ -1270,7 +1270,7 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
return -EALREADY; return -EALREADY;
if (params->smps_mode != NL80211_SMPS_OFF) if (params->smps_mode != NL80211_SMPS_OFF)
return -ENOTSUPP; return -EOPNOTSUPP;
link->smps_mode = IEEE80211_SMPS_OFF; link->smps_mode = IEEE80211_SMPS_OFF;
...@@ -2556,7 +2556,7 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy, ...@@ -2556,7 +2556,7 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy,
* devices that report signal in dBm. * devices that report signal in dBm.
*/ */
if (!ieee80211_hw_check(&sdata->local->hw, SIGNAL_DBM)) if (!ieee80211_hw_check(&sdata->local->hw, SIGNAL_DBM))
return -ENOTSUPP; return -EOPNOTSUPP;
conf->rssi_threshold = nconf->rssi_threshold; conf->rssi_threshold = nconf->rssi_threshold;
} }
if (_chg_mesh_attr(NL80211_MESHCONF_HT_OPMODE, mask)) { if (_chg_mesh_attr(NL80211_MESHCONF_HT_OPMODE, mask)) {
......
...@@ -867,7 +867,7 @@ static int ieee80211_assign_link_chanctx(struct ieee80211_link_data *link, ...@@ -867,7 +867,7 @@ static int ieee80211_assign_link_chanctx(struct ieee80211_link_data *link,
int ret = 0; int ret = 0;
if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_NAN)) if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_NAN))
return -ENOTSUPP; return -EOPNOTSUPP;
conf = rcu_dereference_protected(link->conf->chanctx_conf, conf = rcu_dereference_protected(link->conf->chanctx_conf,
lockdep_is_held(&local->hw.wiphy->mtx)); lockdep_is_held(&local->hw.wiphy->mtx));
...@@ -1115,7 +1115,7 @@ int ieee80211_link_reserve_chanctx(struct ieee80211_link_data *link, ...@@ -1115,7 +1115,7 @@ int ieee80211_link_reserve_chanctx(struct ieee80211_link_data *link,
curr_ctx = ieee80211_link_get_chanctx(link); curr_ctx = ieee80211_link_get_chanctx(link);
if (curr_ctx && local->use_chanctx && !local->ops->switch_vif_chanctx) if (curr_ctx && local->use_chanctx && !local->ops->switch_vif_chanctx)
return -ENOTSUPP; return -EOPNOTSUPP;
new_ctx = ieee80211_find_reservation_chanctx(local, chandef, mode); new_ctx = ieee80211_find_reservation_chanctx(local, chandef, mode);
if (!new_ctx) { if (!new_ctx) {
......
...@@ -800,7 +800,7 @@ drv_cancel_remain_on_channel(struct ieee80211_local *local, ...@@ -800,7 +800,7 @@ drv_cancel_remain_on_channel(struct ieee80211_local *local,
static inline int drv_set_ringparam(struct ieee80211_local *local, static inline int drv_set_ringparam(struct ieee80211_local *local,
u32 tx, u32 rx) u32 tx, u32 rx)
{ {
int ret = -ENOTSUPP; int ret = -EOPNOTSUPP;
might_sleep(); might_sleep();
lockdep_assert_wiphy(local->hw.wiphy); lockdep_assert_wiphy(local->hw.wiphy);
......
...@@ -151,7 +151,7 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags, ...@@ -151,7 +151,7 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
break; break;
default: default:
kfree_skb(skb); kfree_skb(skb);
return -ENOTSUPP; return -EOPNOTSUPP;
} }
*pos++ = ie_len; *pos++ = ie_len;
*pos++ = flags; *pos++ = flags;
......
...@@ -676,10 +676,10 @@ struct mesh_path *mesh_path_add(struct ieee80211_sub_if_data *sdata, ...@@ -676,10 +676,10 @@ struct mesh_path *mesh_path_add(struct ieee80211_sub_if_data *sdata,
if (ether_addr_equal(dst, sdata->vif.addr)) if (ether_addr_equal(dst, sdata->vif.addr))
/* never add ourselves as neighbours */ /* never add ourselves as neighbours */
return ERR_PTR(-ENOTSUPP); return ERR_PTR(-EOPNOTSUPP);
if (is_multicast_ether_addr(dst)) if (is_multicast_ether_addr(dst))
return ERR_PTR(-ENOTSUPP); return ERR_PTR(-EOPNOTSUPP);
if (atomic_add_unless(&sdata->u.mesh.mpaths, 1, MESH_MAX_MPATHS) == 0) if (atomic_add_unless(&sdata->u.mesh.mpaths, 1, MESH_MAX_MPATHS) == 0)
return ERR_PTR(-ENOSPC); return ERR_PTR(-ENOSPC);
...@@ -719,10 +719,10 @@ int mpp_path_add(struct ieee80211_sub_if_data *sdata, ...@@ -719,10 +719,10 @@ int mpp_path_add(struct ieee80211_sub_if_data *sdata,
if (ether_addr_equal(dst, sdata->vif.addr)) if (ether_addr_equal(dst, sdata->vif.addr))
/* never add ourselves as neighbours */ /* never add ourselves as neighbours */
return -ENOTSUPP; return -EOPNOTSUPP;
if (is_multicast_ether_addr(dst)) if (is_multicast_ether_addr(dst))
return -ENOTSUPP; return -EOPNOTSUPP;
new_mpath = mesh_path_new(sdata, dst, GFP_ATOMIC); new_mpath = mesh_path_new(sdata, dst, GFP_ATOMIC);
......
...@@ -1289,7 +1289,7 @@ int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, ...@@ -1289,7 +1289,7 @@ int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata,
iebufsz = local->scan_ies_len + req->ie_len; iebufsz = local->scan_ies_len + req->ie_len;
if (!local->ops->sched_scan_start) if (!local->ops->sched_scan_start)
return -ENOTSUPP; return -EOPNOTSUPP;
for (i = 0; i < NUM_NL80211_BANDS; i++) { for (i = 0; i < NUM_NL80211_BANDS; i++) {
if (local->hw.wiphy->bands[i]) { if (local->hw.wiphy->bands[i]) {
...@@ -1354,7 +1354,7 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_local *local) ...@@ -1354,7 +1354,7 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_local *local)
lockdep_assert_wiphy(local->hw.wiphy); lockdep_assert_wiphy(local->hw.wiphy);
if (!local->ops->sched_scan_stop) if (!local->ops->sched_scan_stop)
return -ENOTSUPP; return -EOPNOTSUPP;
/* We don't want to restart sched scan anymore. */ /* We don't want to restart sched scan anymore. */
RCU_INIT_POINTER(local->sched_scan_req, NULL); RCU_INIT_POINTER(local->sched_scan_req, NULL);
......
...@@ -1001,7 +1001,7 @@ ieee80211_tdls_build_mgmt_packet_data(struct ieee80211_sub_if_data *sdata, ...@@ -1001,7 +1001,7 @@ ieee80211_tdls_build_mgmt_packet_data(struct ieee80211_sub_if_data *sdata,
skb); skb);
break; break;
default: default:
ret = -ENOTSUPP; ret = -EOPNOTSUPP;
break; break;
} }
...@@ -1071,7 +1071,7 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev, ...@@ -1071,7 +1071,7 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev,
/* any value is ok */ /* any value is ok */
break; break;
default: default:
ret = -ENOTSUPP; ret = -EOPNOTSUPP;
break; break;
} }
...@@ -1177,7 +1177,7 @@ ieee80211_tdls_mgmt_setup(struct wiphy *wiphy, struct net_device *dev, ...@@ -1177,7 +1177,7 @@ ieee80211_tdls_mgmt_setup(struct wiphy *wiphy, struct net_device *dev,
smps_mode != IEEE80211_SMPS_OFF) { smps_mode != IEEE80211_SMPS_OFF) {
tdls_dbg(sdata, "Aborting TDLS setup due to SMPS mode %d\n", tdls_dbg(sdata, "Aborting TDLS setup due to SMPS mode %d\n",
smps_mode); smps_mode);
return -ENOTSUPP; return -EOPNOTSUPP;
} }
lockdep_assert_wiphy(local->hw.wiphy); lockdep_assert_wiphy(local->hw.wiphy);
...@@ -1289,7 +1289,7 @@ int ieee80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, ...@@ -1289,7 +1289,7 @@ int ieee80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev,
int ret; int ret;
if (!(wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS)) if (!(wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS))
return -ENOTSUPP; return -EOPNOTSUPP;
/* make sure we are in managed mode, and associated */ /* make sure we are in managed mode, and associated */
if (sdata->vif.type != NL80211_IFTYPE_STATION || if (sdata->vif.type != NL80211_IFTYPE_STATION ||
...@@ -1446,7 +1446,7 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, ...@@ -1446,7 +1446,7 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
lockdep_assert_wiphy(local->hw.wiphy); lockdep_assert_wiphy(local->hw.wiphy);
if (!(wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS)) if (!(wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS))
return -ENOTSUPP; return -EOPNOTSUPP;
if (sdata->vif.type != NL80211_IFTYPE_STATION) if (sdata->vif.type != NL80211_IFTYPE_STATION)
return -EINVAL; return -EINVAL;
...@@ -1459,7 +1459,7 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, ...@@ -1459,7 +1459,7 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
case NL80211_TDLS_SETUP: case NL80211_TDLS_SETUP:
case NL80211_TDLS_DISCOVERY_REQ: case NL80211_TDLS_DISCOVERY_REQ:
/* We don't support in-driver setup/teardown/discovery */ /* We don't support in-driver setup/teardown/discovery */
return -ENOTSUPP; return -EOPNOTSUPP;
} }
/* protect possible bss_conf changes and avoid concurrency in /* protect possible bss_conf changes and avoid concurrency in
...@@ -1510,7 +1510,7 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, ...@@ -1510,7 +1510,7 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
return ret; return ret;
break; break;
default: default:
return -ENOTSUPP; return -EOPNOTSUPP;
} }
if (ether_addr_equal(sdata->u.mgd.tdls_peer, peer)) { if (ether_addr_equal(sdata->u.mgd.tdls_peer, peer)) {
...@@ -1673,7 +1673,7 @@ ieee80211_tdls_channel_switch(struct wiphy *wiphy, struct net_device *dev, ...@@ -1673,7 +1673,7 @@ ieee80211_tdls_channel_switch(struct wiphy *wiphy, struct net_device *dev,
if (!test_sta_flag(sta, WLAN_STA_TDLS_CHAN_SWITCH)) { if (!test_sta_flag(sta, WLAN_STA_TDLS_CHAN_SWITCH)) {
tdls_dbg(sdata, "TDLS channel switch unsupported by %pM\n", tdls_dbg(sdata, "TDLS channel switch unsupported by %pM\n",
addr); addr);
ret = -ENOTSUPP; ret = -EOPNOTSUPP;
goto out; goto out;
} }
...@@ -1993,7 +1993,7 @@ ieee80211_process_tdls_channel_switch_req(struct ieee80211_sub_if_data *sdata, ...@@ -1993,7 +1993,7 @@ ieee80211_process_tdls_channel_switch_req(struct ieee80211_sub_if_data *sdata,
if (!sta->sta.deflink.ht_cap.ht_supported && elems->sec_chan_offs && if (!sta->sta.deflink.ht_cap.ht_supported && elems->sec_chan_offs &&
elems->sec_chan_offs->sec_chan_offs) { elems->sec_chan_offs->sec_chan_offs) {
tdls_dbg(sdata, "TDLS chan switch - wide chan unsupported\n"); tdls_dbg(sdata, "TDLS chan switch - wide chan unsupported\n");
ret = -ENOTSUPP; ret = -EOPNOTSUPP;
goto out; goto out;
} }
......
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