| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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. |
|---|
| 7 | 4 | */ |
|---|
| 8 | 5 | #include <net/mac80211.h> |
|---|
| 9 | 6 | #include "ieee80211_i.h" |
|---|
| .. | .. |
|---|
| 141 | 138 | return ret; |
|---|
| 142 | 139 | } |
|---|
| 143 | 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); |
|---|
| 158 | + trace_drv_return_int(local, ret); |
|---|
| 159 | + return ret; |
|---|
| 160 | +} |
|---|
| 161 | + |
|---|
| 144 | 162 | void drv_sta_rc_update(struct ieee80211_local *local, |
|---|
| 145 | 163 | struct ieee80211_sub_if_data *sdata, |
|---|
| 146 | 164 | struct ieee80211_sta *sta, u32 changed) |
|---|