forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
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"
....@@ -141,6 +138,27 @@
141138 return ret;
142139 }
143140
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);
158
+ trace_drv_return_int(local, ret);
159
+ return ret;
160
+}
161
+
144162 void drv_sta_rc_update(struct ieee80211_local *local,
145163 struct ieee80211_sub_if_data *sdata,
146164 struct ieee80211_sta *sta, u32 changed)