Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: chromeos/compat-wireless/net/mac80211/rate.c

Issue 5326002: Update compat-wireless to 2.6.36-5-spn (Closed) Base URL: http://git.chromium.org/git/kernel.git@master
Patch Set: Fixes for !ACK handling, missing local changes, log message fixes Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2002-2005, Instant802 Networks, Inc. 2 * Copyright 2002-2005, Instant802 Networks, Inc.
3 * Copyright 2005-2006, Devicescape Software, Inc. 3 * Copyright 2005-2006, Devicescape Software, Inc.
4 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz> 4 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz>
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 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 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 if (sta) { 321 if (sta) {
322 /* Filter out rates that the STA does not support */ 322 /* Filter out rates that the STA does not support */
323 mask &= sta->sta.supp_rates[info->band]; 323 mask &= sta->sta.supp_rates[info->band];
324 } 324 }
325 /* 325 /*
326 * Make sure the rate index selected for each TX rate is 326 * Make sure the rate index selected for each TX rate is
327 * included in the configured mask and change the rate indexes 327 * included in the configured mask and change the rate indexes
328 * if needed. 328 * if needed.
329 */ 329 */
330 for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { 330 for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
331 /* Skip invalid rates */
332 if (info->control.rates[i].idx < 0)
333 break;
331 /* Rate masking supports only legacy rates for now */ 334 /* Rate masking supports only legacy rates for now */
332 if (info->control.rates[i].flags & IEEE80211_TX_RC_MCS) 335 if (info->control.rates[i].flags & IEEE80211_TX_RC_MCS)
333 continue; 336 continue;
334 rate_idx_match_mask(&info->control.rates[i], 337 rate_idx_match_mask(&info->control.rates[i],
335 txrc->sband->n_bitrates, mask); 338 txrc->sband->n_bitrates, mask);
336 } 339 }
337 } 340 }
338 341
339 BUG_ON(info->control.rates[0].idx < 0); 342 BUG_ON(info->control.rates[0].idx < 0);
340 } 343 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 456
454 void ieee80211_cqm_bitrate_notify(struct ieee80211_sub_if_data *sdata) 457 void ieee80211_cqm_bitrate_notify(struct ieee80211_sub_if_data *sdata)
455 { 458 {
456 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 459 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
457 u32 bitrate, threshold; 460 u32 bitrate, threshold;
458 int prev_rate_below_threshold, cur_rate_below_threshold; 461 int prev_rate_below_threshold, cur_rate_below_threshold;
459 462
460 if (!netif_running(sdata->dev) || 463 if (!netif_running(sdata->dev) ||
461 sdata->vif.type != NL80211_IFTYPE_STATION) 464 sdata->vif.type != NL80211_IFTYPE_STATION)
462 return; 465 return;
463 466 »
464 /* 467 /*
465 * Skip sending a notification if a the state was cleared 468 * Skip sending a notification if a the state was cleared
466 * after the workproc was scheduled (e.g, if userspace 469 * after the workproc was scheduled (e.g, if userspace
467 * canceled CQM monitoring) 470 * canceled CQM monitoring)
468 */ 471 */
469 if (!ifmgd->tx_bitrate_changed || ifmgd->cqm_bitrate_thold == 0) 472 if (!ifmgd->tx_bitrate_changed || ifmgd->cqm_bitrate_thold == 0)
470 return; 473 return;
471 474
472 ifmgd->tx_bitrate_changed = false; 475 ifmgd->tx_bitrate_changed = false;
473 476
(...skipping 15 matching lines...) Expand all
489 */ 492 */
490 if (ifmgd->last_cqm_bitrate == 0 || 493 if (ifmgd->last_cqm_bitrate == 0 ||
491 prev_rate_below_threshold != cur_rate_below_threshold || 494 prev_rate_below_threshold != cur_rate_below_threshold ||
492 (cur_rate_below_threshold && bitrate < ifmgd->last_cqm_bitrate)) { 495 (cur_rate_below_threshold && bitrate < ifmgd->last_cqm_bitrate)) {
493 cfg80211_cqm_bitrate_notify(sdata->dev, bitrate, 496 cfg80211_cqm_bitrate_notify(sdata->dev, bitrate,
494 GFP_KERNEL); 497 GFP_KERNEL);
495 ifmgd->last_cqm_bitrate = bitrate; 498 ifmgd->last_cqm_bitrate = bitrate;
496 I802_DEBUG_INC(sdata->local->tx_cqm_notify_count); 499 I802_DEBUG_INC(sdata->local->tx_cqm_notify_count);
497 } 500 }
498 } 501 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698