mac80211: remove hw.conf.channel usage where possible
Removes hw.conf.channel usage from the following functions: * ieee80211_mandatory_rates * ieee80211_sta_get_rates * ieee80211_frame_duration * ieee80211_rts_duration * ieee80211_ctstoself_duration This is in preparation for multi-channel operation. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
f58cc809d2
commit
4ee73f338a
@@ -334,14 +334,15 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
|
||||
|
||||
|
||||
static void
|
||||
calc_rate_durations(struct ieee80211_local *local, struct minstrel_rate *d,
|
||||
calc_rate_durations(enum ieee80211_band band,
|
||||
struct minstrel_rate *d,
|
||||
struct ieee80211_rate *rate)
|
||||
{
|
||||
int erp = !!(rate->flags & IEEE80211_RATE_ERP_G);
|
||||
|
||||
d->perfect_tx_time = ieee80211_frame_duration(local, 1200,
|
||||
d->perfect_tx_time = ieee80211_frame_duration(band, 1200,
|
||||
rate->bitrate, erp, 1);
|
||||
d->ack_time = ieee80211_frame_duration(local, 10,
|
||||
d->ack_time = ieee80211_frame_duration(band, 10,
|
||||
rate->bitrate, erp, 1);
|
||||
}
|
||||
|
||||
@@ -379,14 +380,14 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband,
|
||||
{
|
||||
struct minstrel_sta_info *mi = priv_sta;
|
||||
struct minstrel_priv *mp = priv;
|
||||
struct ieee80211_local *local = hw_to_local(mp->hw);
|
||||
struct ieee80211_rate *ctl_rate;
|
||||
unsigned int i, n = 0;
|
||||
unsigned int t_slot = 9; /* FIXME: get real slot time */
|
||||
|
||||
mi->lowest_rix = rate_lowest_index(sband, sta);
|
||||
ctl_rate = &sband->bitrates[mi->lowest_rix];
|
||||
mi->sp_ack_dur = ieee80211_frame_duration(local, 10, ctl_rate->bitrate,
|
||||
mi->sp_ack_dur = ieee80211_frame_duration(sband->band, 10,
|
||||
ctl_rate->bitrate,
|
||||
!!(ctl_rate->flags & IEEE80211_RATE_ERP_G), 1);
|
||||
|
||||
for (i = 0; i < sband->n_bitrates; i++) {
|
||||
@@ -402,7 +403,7 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband,
|
||||
|
||||
mr->rix = i;
|
||||
mr->bitrate = sband->bitrates[i].bitrate / 5;
|
||||
calc_rate_durations(local, mr, &sband->bitrates[i]);
|
||||
calc_rate_durations(sband->band, mr, &sband->bitrates[i]);
|
||||
|
||||
/* calculate maximum number of retransmissions before
|
||||
* fallback (based on maximum segment size) */
|
||||
|
Reference in New Issue
Block a user