| .. | .. |
|---|
| 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" |
|---|
| .. | .. |
|---|
| 137 | 134 | new_state == IEEE80211_STA_AUTH) { |
|---|
| 138 | 135 | drv_sta_remove(local, sdata, &sta->sta); |
|---|
| 139 | 136 | } |
|---|
| 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); |
|---|
| 140 | 158 | trace_drv_return_int(local, ret); |
|---|
| 141 | 159 | return ret; |
|---|
| 142 | 160 | } |
|---|
| .. | .. |
|---|
| 313 | 331 | |
|---|
| 314 | 332 | might_sleep(); |
|---|
| 315 | 333 | |
|---|
| 334 | + if (!sdata) |
|---|
| 335 | + return -EIO; |
|---|
| 336 | + |
|---|
| 316 | 337 | sdata = get_bss_sdata(sdata); |
|---|
| 317 | 338 | if (!check_sdata_in_driver(sdata)) |
|---|
| 318 | 339 | return -EIO; |
|---|