mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
wifi: mac80211: remove ieee80211_sta_cap_chan_bw()
This function is only used by TDLS, but is more or less equivalent to ieee80211_sta_cap_rx_bw() (which takes OMI into account, but that won't be used in TDLS), except it tries to differentiate 80+80 and 160, but then caller doesn't care about that. Remove the function. Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20260415144514.138728393e2b.I4ea9221cafcfd034dda430e76de82eec59ab1e71@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
0e5c735ef7
commit
163ddfd3bb
|
|
@ -2316,8 +2316,6 @@ ieee80211_sta_cur_vht_bw(struct link_sta_info *link_sta)
|
|||
return _ieee80211_sta_cur_vht_bw(link_sta, NULL);
|
||||
}
|
||||
void ieee80211_sta_init_nss(struct link_sta_info *link_sta);
|
||||
enum nl80211_chan_width
|
||||
ieee80211_sta_cap_chan_bw(struct link_sta_info *link_sta);
|
||||
void ieee80211_process_mu_groups(struct ieee80211_sub_if_data *sdata,
|
||||
struct ieee80211_link_data *link,
|
||||
struct ieee80211_mgmt *mgmt);
|
||||
|
|
|
|||
|
|
@ -311,17 +311,20 @@ ieee80211_tdls_chandef_vht_upgrade(struct ieee80211_sub_if_data *sdata,
|
|||
/* IEEE802.11ac-2013 Table E-4 */
|
||||
static const u16 centers_80mhz[] = { 5210, 5290, 5530, 5610, 5690, 5775 };
|
||||
struct cfg80211_chan_def uc = sta->tdls_chandef;
|
||||
enum nl80211_chan_width max_width =
|
||||
ieee80211_sta_cap_chan_bw(&sta->deflink);
|
||||
enum nl80211_chan_width max_width;
|
||||
int i;
|
||||
|
||||
/* only support upgrading non-narrow channels up to 80Mhz */
|
||||
if (max_width == NL80211_CHAN_WIDTH_5 ||
|
||||
max_width == NL80211_CHAN_WIDTH_10)
|
||||
return;
|
||||
|
||||
if (max_width > NL80211_CHAN_WIDTH_80)
|
||||
switch (ieee80211_sta_cap_rx_bw(&sta->deflink)) {
|
||||
case IEEE80211_STA_RX_BW_20:
|
||||
max_width = NL80211_CHAN_WIDTH_20;
|
||||
break;
|
||||
case IEEE80211_STA_RX_BW_40:
|
||||
max_width = NL80211_CHAN_WIDTH_40;
|
||||
break;
|
||||
default: /* 80 or higher, only support upgrade to 80 */
|
||||
max_width = NL80211_CHAN_WIDTH_80;
|
||||
break;
|
||||
}
|
||||
|
||||
if (uc.width >= max_width)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -433,30 +433,6 @@ _ieee80211_sta_cap_rx_bw(struct link_sta_info *link_sta,
|
|||
link_sta->rx_omi_bw_rx);
|
||||
}
|
||||
|
||||
enum nl80211_chan_width
|
||||
ieee80211_sta_cap_chan_bw(struct link_sta_info *link_sta)
|
||||
{
|
||||
struct ieee80211_sta_vht_cap *vht_cap = &link_sta->pub->vht_cap;
|
||||
u32 cap_width;
|
||||
|
||||
if (!vht_cap->vht_supported) {
|
||||
if (!link_sta->pub->ht_cap.ht_supported)
|
||||
return NL80211_CHAN_WIDTH_20_NOHT;
|
||||
|
||||
return link_sta->pub->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40 ?
|
||||
NL80211_CHAN_WIDTH_40 : NL80211_CHAN_WIDTH_20;
|
||||
}
|
||||
|
||||
cap_width = vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK;
|
||||
|
||||
if (cap_width == IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ)
|
||||
return NL80211_CHAN_WIDTH_160;
|
||||
else if (cap_width == IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ)
|
||||
return NL80211_CHAN_WIDTH_80P80;
|
||||
|
||||
return NL80211_CHAN_WIDTH_80;
|
||||
}
|
||||
|
||||
enum nl80211_chan_width
|
||||
ieee80211_sta_rx_bw_to_chan_width(struct link_sta_info *link_sta)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user