rate.h (e7d9facf0bab6d919342fea17c8cc0f65f8a0fe9) | rate.h (55de908ab292c03f1eb280f51170ddb9c6b57e31) |
---|---|
1/* 2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2005, Devicescape Software, Inc. 4 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 38 unchanged lines hidden (view full) --- 47 48static inline void rate_control_rate_init(struct sta_info *sta) 49{ 50 struct ieee80211_local *local = sta->sdata->local; 51 struct rate_control_ref *ref = sta->rate_ctrl; 52 struct ieee80211_sta *ista = &sta->sta; 53 void *priv_sta = sta->rate_ctrl_priv; 54 struct ieee80211_supported_band *sband; | 1/* 2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2005, Devicescape Software, Inc. 4 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 38 unchanged lines hidden (view full) --- 47 48static inline void rate_control_rate_init(struct sta_info *sta) 49{ 50 struct ieee80211_local *local = sta->sdata->local; 51 struct rate_control_ref *ref = sta->rate_ctrl; 52 struct ieee80211_sta *ista = &sta->sta; 53 void *priv_sta = sta->rate_ctrl_priv; 54 struct ieee80211_supported_band *sband; |
55 struct ieee80211_chanctx_conf *chanctx_conf; |
|
55 56 if (!ref) 57 return; 58 | 56 57 if (!ref) 58 return; 59 |
59 sband = local->hw.wiphy->bands[local->oper_channel->band]; | 60 rcu_read_lock(); |
60 | 61 |
62 chanctx_conf = rcu_dereference(sta->sdata->vif.chanctx_conf); 63 if (WARN_ON(!chanctx_conf)) { 64 rcu_read_unlock(); 65 return; 66 } 67 68 sband = local->hw.wiphy->bands[chanctx_conf->channel->band]; 69 rcu_read_unlock(); 70 |
|
61 ref->ops->rate_init(ref->priv, sband, ista, priv_sta); 62 set_sta_flag(sta, WLAN_STA_RATE_CONTROL); 63} 64 65static inline void rate_control_rate_update(struct ieee80211_local *local, 66 struct ieee80211_supported_band *sband, 67 struct sta_info *sta, u32 changed) 68{ --- 94 unchanged lines hidden --- | 71 ref->ops->rate_init(ref->priv, sband, ista, priv_sta); 72 set_sta_flag(sta, WLAN_STA_RATE_CONTROL); 73} 74 75static inline void rate_control_rate_update(struct ieee80211_local *local, 76 struct ieee80211_supported_band *sband, 77 struct sta_info *sta, u32 changed) 78{ --- 94 unchanged lines hidden --- |