• Home
  • Raw
  • Download

Lines Matching refs:dev

153 struct rc80211_ctx * rc80211_init ( struct net80211_device *dev __unused )  in rc80211_init()
193 static int rc80211_pick_best ( struct net80211_device *dev ) in rc80211_pick_best() argument
195 struct rc80211_ctx *ctx = dev->rctl; in rc80211_pick_best()
198 for ( i = 0; i < dev->nr_rates; i++ ) { in rc80211_pick_best()
210 int old_good = rc80211_calc_net_goodness ( ctx, dev->rate ); in rc80211_pick_best()
219 return dev->rate; in rc80211_pick_best()
231 static inline void rc80211_set_rate ( struct net80211_device *dev, in rc80211_set_rate() argument
234 DBGC ( dev->rctl, "802.11 RC %p changing rate %d->%d Mbps\n", dev->rctl, in rc80211_set_rate()
235 dev->rates[dev->rate] / 10, dev->rates[rate_idx] / 10 ); in rc80211_set_rate()
237 net80211_set_rate_idx ( dev, rate_idx ); in rc80211_set_rate()
245 static void rc80211_maybe_set_new ( struct net80211_device *dev ) in rc80211_maybe_set_new() argument
247 struct rc80211_ctx *ctx = dev->rctl; in rc80211_maybe_set_new()
250 net_good = rc80211_calc_net_goodness ( ctx, dev->rate ); in rc80211_maybe_set_new()
253 rc80211_set_rate ( dev, rc80211_pick_best ( dev ) ); in rc80211_maybe_set_new()
260 if ( net_good > RC_GOODNESS_MAX && dev->rate + 1 < dev->nr_rates ) { in rc80211_maybe_set_new()
261 int higher = rc80211_calc_net_goodness ( ctx, dev->rate + 1 ); in rc80211_maybe_set_new()
263 rc80211_set_rate ( dev, dev->rate + 1 ); in rc80211_maybe_set_new()
265 rc80211_set_rate ( dev, rc80211_pick_best ( dev ) ); in rc80211_maybe_set_new()
269 rc80211_set_rate ( dev, rc80211_pick_best ( dev ) ); in rc80211_maybe_set_new()
282 static void rc80211_update ( struct net80211_device *dev, int direction, in rc80211_update() argument
285 struct rc80211_ctx *ctx = dev->rctl; in rc80211_update()
305 rc80211_maybe_set_new ( dev ); in rc80211_update()
315 void rc80211_update_tx ( struct net80211_device *dev, int retries, int rc ) in rc80211_update_tx() argument
317 struct rc80211_ctx *ctx = dev->rctl; in rc80211_update_tx()
322 rc80211_update ( dev, TX, dev->rate, retries, rc ); in rc80211_update_tx()
325 if ( ! ( ctx->goodness[TX][dev->rate] & in rc80211_update_tx()
327 if ( dev->rate == 0 ) in rc80211_update_tx()
328 DBGC ( dev->rctl, "802.11 RC %p saw %d consecutive " in rc80211_update_tx()
330 dev->rctl, RC_TX_EMERG_FAIL ); in rc80211_update_tx()
332 DBGC ( dev->rctl, "802.11 RC %p lowering rate (%d->%d " in rc80211_update_tx()
334 dev->rctl, dev->rates[dev->rate] / 10, in rc80211_update_tx()
335 dev->rates[dev->rate - 1] / 10, in rc80211_update_tx()
338 rc80211_set_rate ( dev, dev->rate - 1 ); in rc80211_update_tx()
350 void rc80211_update_rx ( struct net80211_device *dev, int retry, u16 rate ) in rc80211_update_rx() argument
354 for ( ridx = 0; ridx < dev->nr_rates && dev->rates[ridx] != rate; in rc80211_update_rx()
357 if ( ridx >= dev->nr_rates ) in rc80211_update_rx()
360 rc80211_update ( dev, RX, ridx, retry, 0 ); in rc80211_update_rx()