wifi: mac80211: Replace ENOTSUPP with EOPNOTSUPP
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Mon, 11 Dec 2023 07:05:25 +0000 (09:05 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 12 Dec 2023 09:37:01 +0000 (10:37 +0100)
ENOTSUP isn't a standard error code. EOPNOTSUPP should be used instead.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20231211085121.3841b71c867d.Idf2ad01d9dfe8d6d6c352bf02deb06e49701ad1d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c
net/mac80211/chan.c
net/mac80211/driver-ops.h
net/mac80211/mesh_hwmp.c
net/mac80211/mesh_pathtbl.c
net/mac80211/scan.c
net/mac80211/tdls.c

index 606b1b2e41235e4491518cf849aa3b6cb0adaabb..e0a4f9eecb2cb4373d3485425712bf3cbe5565a3 100644 (file)
@@ -1270,7 +1270,7 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
                return -EALREADY;
 
        if (params->smps_mode != NL80211_SMPS_OFF)
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        link->smps_mode = IEEE80211_SMPS_OFF;
 
@@ -2556,7 +2556,7 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy,
                 * devices that report signal in dBm.
                 */
                if (!ieee80211_hw_check(&sdata->local->hw, SIGNAL_DBM))
-                       return -ENOTSUPP;
+                       return -EOPNOTSUPP;
                conf->rssi_threshold = nconf->rssi_threshold;
        }
        if (_chg_mesh_attr(NL80211_MESHCONF_HT_OPMODE, mask)) {
index aa24585359ee53a6f03c43c5b6a76f140f36f528..ef4c2cebc08089bd3b77778d9e3f58abf34641e8 100644 (file)
@@ -867,7 +867,7 @@ static int ieee80211_assign_link_chanctx(struct ieee80211_link_data *link,
        int ret = 0;
 
        if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_NAN))
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        conf = rcu_dereference_protected(link->conf->chanctx_conf,
                                         lockdep_is_held(&local->hw.wiphy->mtx));
@@ -1115,7 +1115,7 @@ int ieee80211_link_reserve_chanctx(struct ieee80211_link_data *link,
 
        curr_ctx = ieee80211_link_get_chanctx(link);
        if (curr_ctx && local->use_chanctx && !local->ops->switch_vif_chanctx)
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        new_ctx = ieee80211_find_reservation_chanctx(local, chandef, mode);
        if (!new_ctx) {
index 568633b38c47360d0de6e6f856da63b3776ad19f..fecf92f06da7faec6f8f63784c217b1dc33127d5 100644 (file)
@@ -800,7 +800,7 @@ drv_cancel_remain_on_channel(struct ieee80211_local *local,
 static inline int drv_set_ringparam(struct ieee80211_local *local,
                                    u32 tx, u32 rx)
 {
-       int ret = -ENOTSUPP;
+       int ret = -EOPNOTSUPP;
 
        might_sleep();
        lockdep_assert_wiphy(local->hw.wiphy);
index 775d52561c54a02b09358c1d901aeb460f0d06ce..024f48db6b05b8ac4e42368e1bd11a080c709f10 100644 (file)
@@ -151,7 +151,7 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
                break;
        default:
                kfree_skb(skb);
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
        }
        *pos++ = ie_len;
        *pos++ = flags;
index 8a3f44ce3e04163849c05aa1931b253427762a0a..735edde1bd8199931ba93975f00f84ed7f490462 100644 (file)
@@ -676,10 +676,10 @@ struct mesh_path *mesh_path_add(struct ieee80211_sub_if_data *sdata,
 
        if (ether_addr_equal(dst, sdata->vif.addr))
                /* never add ourselves as neighbours */
-               return ERR_PTR(-ENOTSUPP);
+               return ERR_PTR(-EOPNOTSUPP);
 
        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)
                return ERR_PTR(-ENOSPC);
@@ -719,10 +719,10 @@ int mpp_path_add(struct ieee80211_sub_if_data *sdata,
 
        if (ether_addr_equal(dst, sdata->vif.addr))
                /* never add ourselves as neighbours */
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        if (is_multicast_ether_addr(dst))
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        new_mpath = mesh_path_new(sdata, dst, GFP_ATOMIC);
 
index 1d98877647d85c71fa4666f552afe0b421380411..645355e5f1bc7baba435db18c0c8d8243a4649c6 100644 (file)
@@ -1289,7 +1289,7 @@ int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata,
        iebufsz = local->scan_ies_len + req->ie_len;
 
        if (!local->ops->sched_scan_start)
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        for (i = 0; i < NUM_NL80211_BANDS; i++) {
                if (local->hw.wiphy->bands[i]) {
@@ -1354,7 +1354,7 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_local *local)
        lockdep_assert_wiphy(local->hw.wiphy);
 
        if (!local->ops->sched_scan_stop)
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        /* We don't want to restart sched scan anymore. */
        RCU_INIT_POINTER(local->sched_scan_req, NULL);
index 05a7dff69fe94f77a8db27c9b88b99d39b414af3..49730b424141a89f419990c8158704d69e94ce6a 100644 (file)
@@ -1001,7 +1001,7 @@ ieee80211_tdls_build_mgmt_packet_data(struct ieee80211_sub_if_data *sdata,
                                                 skb);
                break;
        default:
-               ret = -ENOTSUPP;
+               ret = -EOPNOTSUPP;
                break;
        }
 
@@ -1071,7 +1071,7 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev,
                /* any value is ok */
                break;
        default:
-               ret = -ENOTSUPP;
+               ret = -EOPNOTSUPP;
                break;
        }
 
@@ -1177,7 +1177,7 @@ ieee80211_tdls_mgmt_setup(struct wiphy *wiphy, struct net_device *dev,
            smps_mode != IEEE80211_SMPS_OFF) {
                tdls_dbg(sdata, "Aborting TDLS setup due to SMPS mode %d\n",
                         smps_mode);
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
        }
 
        lockdep_assert_wiphy(local->hw.wiphy);
@@ -1289,7 +1289,7 @@ int ieee80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev,
        int ret;
 
        if (!(wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS))
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        /* make sure we are in managed mode, and associated */
        if (sdata->vif.type != NL80211_IFTYPE_STATION ||
@@ -1446,7 +1446,7 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
        lockdep_assert_wiphy(local->hw.wiphy);
 
        if (!(wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS))
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        if (sdata->vif.type != NL80211_IFTYPE_STATION)
                return -EINVAL;
@@ -1459,7 +1459,7 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
        case NL80211_TDLS_SETUP:
        case NL80211_TDLS_DISCOVERY_REQ:
                /* We don't support in-driver setup/teardown/discovery */
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
        }
 
        /* protect possible bss_conf changes and avoid concurrency in
@@ -1510,7 +1510,7 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
                        return ret;
                break;
        default:
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
        }
 
        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,
        if (!test_sta_flag(sta, WLAN_STA_TDLS_CHAN_SWITCH)) {
                tdls_dbg(sdata, "TDLS channel switch unsupported by %pM\n",
                         addr);
-               ret = -ENOTSUPP;
+               ret = -EOPNOTSUPP;
                goto out;
        }
 
@@ -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 &&
            elems->sec_chan_offs->sec_chan_offs) {
                tdls_dbg(sdata, "TDLS chan switch - wide chan unsupported\n");
-               ret = -ENOTSUPP;
+               ret = -EOPNOTSUPP;
                goto out;
        }