hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/mac80211/driver-ops.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright 2015 Intel Deutschland GmbH
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
74 */
85 #include <net/mac80211.h>
96 #include "ieee80211_i.h"
....@@ -137,6 +134,27 @@
137134 new_state == IEEE80211_STA_AUTH) {
138135 drv_sta_remove(local, sdata, &sta->sta);
139136 }
137
+ trace_drv_return_int(local, ret);
138
+ return ret;
139
+}
140
+
141
+__must_check
142
+int drv_sta_set_txpwr(struct ieee80211_local *local,
143
+ struct ieee80211_sub_if_data *sdata,
144
+ struct sta_info *sta)
145
+{
146
+ int ret = -EOPNOTSUPP;
147
+
148
+ might_sleep();
149
+
150
+ sdata = get_bss_sdata(sdata);
151
+ if (!check_sdata_in_driver(sdata))
152
+ return -EIO;
153
+
154
+ trace_drv_sta_set_txpwr(local, sdata, &sta->sta);
155
+ if (local->ops->sta_set_txpwr)
156
+ ret = local->ops->sta_set_txpwr(&local->hw, &sdata->vif,
157
+ &sta->sta);
140158 trace_drv_return_int(local, ret);
141159 return ret;
142160 }
....@@ -313,6 +331,9 @@
313331
314332 might_sleep();
315333
334
+ if (!sdata)
335
+ return -EIO;
336
+
316337 sdata = get_bss_sdata(sdata);
317338 if (!check_sdata_in_driver(sdata))
318339 return -EIO;