diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/main.c | 4 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 13 | ||||
-rw-r--r-- | net/mac80211/rc80211_pid.h | 5 | ||||
-rw-r--r-- | net/mac80211/rc80211_pid_algo.c | 31 |
4 files changed, 24 insertions, 29 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 98c0b5e56ecc..df0836ff1a20 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -530,8 +530,6 @@ static int ieee80211_stop(struct net_device *dev) | |||
530 | local->sta_hw_scanning = 0; | 530 | local->sta_hw_scanning = 0; |
531 | } | 531 | } |
532 | 532 | ||
533 | flush_workqueue(local->hw.workqueue); | ||
534 | |||
535 | sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED; | 533 | sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED; |
536 | kfree(sdata->u.sta.extra_ie); | 534 | kfree(sdata->u.sta.extra_ie); |
537 | sdata->u.sta.extra_ie = NULL; | 535 | sdata->u.sta.extra_ie = NULL; |
@@ -555,6 +553,8 @@ static int ieee80211_stop(struct net_device *dev) | |||
555 | 553 | ||
556 | ieee80211_led_radio(local, 0); | 554 | ieee80211_led_radio(local, 0); |
557 | 555 | ||
556 | flush_workqueue(local->hw.workqueue); | ||
557 | |||
558 | tasklet_disable(&local->tx_pending_tasklet); | 558 | tasklet_disable(&local->tx_pending_tasklet); |
559 | tasklet_disable(&local->tasklet); | 559 | tasklet_disable(&local->tasklet); |
560 | } | 560 | } |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4d2b582dd055..b404537c0bcd 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -547,15 +547,14 @@ static void ieee80211_set_associated(struct net_device *dev, | |||
547 | sdata->bss_conf.ht_bss_conf = &conf->ht_bss_conf; | 547 | sdata->bss_conf.ht_bss_conf = &conf->ht_bss_conf; |
548 | } | 548 | } |
549 | 549 | ||
550 | netif_carrier_on(dev); | ||
551 | ifsta->flags |= IEEE80211_STA_PREV_BSSID_SET; | 550 | ifsta->flags |= IEEE80211_STA_PREV_BSSID_SET; |
552 | memcpy(ifsta->prev_bssid, sdata->u.sta.bssid, ETH_ALEN); | 551 | memcpy(ifsta->prev_bssid, sdata->u.sta.bssid, ETH_ALEN); |
553 | memcpy(wrqu.ap_addr.sa_data, sdata->u.sta.bssid, ETH_ALEN); | 552 | memcpy(wrqu.ap_addr.sa_data, sdata->u.sta.bssid, ETH_ALEN); |
554 | ieee80211_sta_send_associnfo(dev, ifsta); | 553 | ieee80211_sta_send_associnfo(dev, ifsta); |
555 | } else { | 554 | } else { |
555 | netif_carrier_off(dev); | ||
556 | ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid); | 556 | ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid); |
557 | ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; | 557 | ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; |
558 | netif_carrier_off(dev); | ||
559 | ieee80211_reset_erp_info(dev); | 558 | ieee80211_reset_erp_info(dev); |
560 | 559 | ||
561 | sdata->bss_conf.assoc_ht = 0; | 560 | sdata->bss_conf.assoc_ht = 0; |
@@ -569,6 +568,10 @@ static void ieee80211_set_associated(struct net_device *dev, | |||
569 | 568 | ||
570 | sdata->bss_conf.assoc = assoc; | 569 | sdata->bss_conf.assoc = assoc; |
571 | ieee80211_bss_info_change_notify(sdata, changed); | 570 | ieee80211_bss_info_change_notify(sdata, changed); |
571 | |||
572 | if (assoc) | ||
573 | netif_carrier_on(dev); | ||
574 | |||
572 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | 575 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; |
573 | wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); | 576 | wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); |
574 | } | 577 | } |
@@ -3611,8 +3614,10 @@ static int ieee80211_sta_find_ibss(struct net_device *dev, | |||
3611 | spin_unlock_bh(&local->sta_bss_lock); | 3614 | spin_unlock_bh(&local->sta_bss_lock); |
3612 | 3615 | ||
3613 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 3616 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
3614 | printk(KERN_DEBUG " sta_find_ibss: selected %s current " | 3617 | if (found) |
3615 | "%s\n", print_mac(mac, bssid), print_mac(mac2, ifsta->bssid)); | 3618 | printk(KERN_DEBUG " sta_find_ibss: selected %s current " |
3619 | "%s\n", print_mac(mac, bssid), | ||
3620 | print_mac(mac2, ifsta->bssid)); | ||
3616 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ | 3621 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ |
3617 | if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0 && | 3622 | if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0 && |
3618 | (bss = ieee80211_rx_bss_get(dev, bssid, | 3623 | (bss = ieee80211_rx_bss_get(dev, bssid, |
diff --git a/net/mac80211/rc80211_pid.h b/net/mac80211/rc80211_pid.h index 04afc13ed825..4ea7b97d1af1 100644 --- a/net/mac80211/rc80211_pid.h +++ b/net/mac80211/rc80211_pid.h | |||
@@ -141,7 +141,6 @@ struct rc_pid_events_file_info { | |||
141 | * rate behaviour values (lower means we should trust more what we learnt | 141 | * rate behaviour values (lower means we should trust more what we learnt |
142 | * about behaviour of rates, higher means we should trust more the natural | 142 | * about behaviour of rates, higher means we should trust more the natural |
143 | * ordering of rates) | 143 | * ordering of rates) |
144 | * @fast_start: if Y, push high rates right after initialization | ||
145 | */ | 144 | */ |
146 | struct rc_pid_debugfs_entries { | 145 | struct rc_pid_debugfs_entries { |
147 | struct dentry *dir; | 146 | struct dentry *dir; |
@@ -154,7 +153,6 @@ struct rc_pid_debugfs_entries { | |||
154 | struct dentry *sharpen_factor; | 153 | struct dentry *sharpen_factor; |
155 | struct dentry *sharpen_duration; | 154 | struct dentry *sharpen_duration; |
156 | struct dentry *norm_offset; | 155 | struct dentry *norm_offset; |
157 | struct dentry *fast_start; | ||
158 | }; | 156 | }; |
159 | 157 | ||
160 | void rate_control_pid_event_tx_status(struct rc_pid_event_buffer *buf, | 158 | void rate_control_pid_event_tx_status(struct rc_pid_event_buffer *buf, |
@@ -267,9 +265,6 @@ struct rc_pid_info { | |||
267 | /* Normalization offset. */ | 265 | /* Normalization offset. */ |
268 | unsigned int norm_offset; | 266 | unsigned int norm_offset; |
269 | 267 | ||
270 | /* Fast starst parameter. */ | ||
271 | unsigned int fast_start; | ||
272 | |||
273 | /* Rates information. */ | 268 | /* Rates information. */ |
274 | struct rc_pid_rateinfo *rinfo; | 269 | struct rc_pid_rateinfo *rinfo; |
275 | 270 | ||
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c index a849b745bdb5..bcd27c1d7594 100644 --- a/net/mac80211/rc80211_pid_algo.c +++ b/net/mac80211/rc80211_pid_algo.c | |||
@@ -398,13 +398,25 @@ static void *rate_control_pid_alloc(struct ieee80211_local *local) | |||
398 | return NULL; | 398 | return NULL; |
399 | } | 399 | } |
400 | 400 | ||
401 | pinfo->target = RC_PID_TARGET_PF; | ||
402 | pinfo->sampling_period = RC_PID_INTERVAL; | ||
403 | pinfo->coeff_p = RC_PID_COEFF_P; | ||
404 | pinfo->coeff_i = RC_PID_COEFF_I; | ||
405 | pinfo->coeff_d = RC_PID_COEFF_D; | ||
406 | pinfo->smoothing_shift = RC_PID_SMOOTHING_SHIFT; | ||
407 | pinfo->sharpen_factor = RC_PID_SHARPENING_FACTOR; | ||
408 | pinfo->sharpen_duration = RC_PID_SHARPENING_DURATION; | ||
409 | pinfo->norm_offset = RC_PID_NORM_OFFSET; | ||
410 | pinfo->rinfo = rinfo; | ||
411 | pinfo->oldrate = 0; | ||
412 | |||
401 | /* Sort the rates. This is optimized for the most common case (i.e. | 413 | /* Sort the rates. This is optimized for the most common case (i.e. |
402 | * almost-sorted CCK+OFDM rates). Kind of bubble-sort with reversed | 414 | * almost-sorted CCK+OFDM rates). Kind of bubble-sort with reversed |
403 | * mapping too. */ | 415 | * mapping too. */ |
404 | for (i = 0; i < sband->n_bitrates; i++) { | 416 | for (i = 0; i < sband->n_bitrates; i++) { |
405 | rinfo[i].index = i; | 417 | rinfo[i].index = i; |
406 | rinfo[i].rev_index = i; | 418 | rinfo[i].rev_index = i; |
407 | if (pinfo->fast_start) | 419 | if (RC_PID_FAST_START) |
408 | rinfo[i].diff = 0; | 420 | rinfo[i].diff = 0; |
409 | else | 421 | else |
410 | rinfo[i].diff = i * pinfo->norm_offset; | 422 | rinfo[i].diff = i * pinfo->norm_offset; |
@@ -425,19 +437,6 @@ static void *rate_control_pid_alloc(struct ieee80211_local *local) | |||
425 | break; | 437 | break; |
426 | } | 438 | } |
427 | 439 | ||
428 | pinfo->target = RC_PID_TARGET_PF; | ||
429 | pinfo->sampling_period = RC_PID_INTERVAL; | ||
430 | pinfo->coeff_p = RC_PID_COEFF_P; | ||
431 | pinfo->coeff_i = RC_PID_COEFF_I; | ||
432 | pinfo->coeff_d = RC_PID_COEFF_D; | ||
433 | pinfo->smoothing_shift = RC_PID_SMOOTHING_SHIFT; | ||
434 | pinfo->sharpen_factor = RC_PID_SHARPENING_FACTOR; | ||
435 | pinfo->sharpen_duration = RC_PID_SHARPENING_DURATION; | ||
436 | pinfo->norm_offset = RC_PID_NORM_OFFSET; | ||
437 | pinfo->fast_start = RC_PID_FAST_START; | ||
438 | pinfo->rinfo = rinfo; | ||
439 | pinfo->oldrate = 0; | ||
440 | |||
441 | #ifdef CONFIG_MAC80211_DEBUGFS | 440 | #ifdef CONFIG_MAC80211_DEBUGFS |
442 | de = &pinfo->dentries; | 441 | de = &pinfo->dentries; |
443 | de->dir = debugfs_create_dir("rc80211_pid", | 442 | de->dir = debugfs_create_dir("rc80211_pid", |
@@ -465,9 +464,6 @@ static void *rate_control_pid_alloc(struct ieee80211_local *local) | |||
465 | de->norm_offset = debugfs_create_u32("norm_offset", | 464 | de->norm_offset = debugfs_create_u32("norm_offset", |
466 | S_IRUSR | S_IWUSR, de->dir, | 465 | S_IRUSR | S_IWUSR, de->dir, |
467 | &pinfo->norm_offset); | 466 | &pinfo->norm_offset); |
468 | de->fast_start = debugfs_create_bool("fast_start", | ||
469 | S_IRUSR | S_IWUSR, de->dir, | ||
470 | &pinfo->fast_start); | ||
471 | #endif | 467 | #endif |
472 | 468 | ||
473 | return pinfo; | 469 | return pinfo; |
@@ -479,7 +475,6 @@ static void rate_control_pid_free(void *priv) | |||
479 | #ifdef CONFIG_MAC80211_DEBUGFS | 475 | #ifdef CONFIG_MAC80211_DEBUGFS |
480 | struct rc_pid_debugfs_entries *de = &pinfo->dentries; | 476 | struct rc_pid_debugfs_entries *de = &pinfo->dentries; |
481 | 477 | ||
482 | debugfs_remove(de->fast_start); | ||
483 | debugfs_remove(de->norm_offset); | 478 | debugfs_remove(de->norm_offset); |
484 | debugfs_remove(de->sharpen_duration); | 479 | debugfs_remove(de->sharpen_duration); |
485 | debugfs_remove(de->sharpen_factor); | 480 | debugfs_remove(de->sharpen_factor); |