diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-09 18:10:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-09 18:10:09 -0400 |
commit | 2ddddb98694af847f70463dbdc69aa491d9f477a (patch) | |
tree | c4115467a95e9e1dbce3e71934eecb1168bc90bb | |
parent | 252815b0cfe711001eff0327872209986b36d490 (diff) | |
parent | 814feefa859a736d29d0700d49debf13904b429f (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 1 | ||||
-rw-r--r-- | net/mac80211/rc80211_pid.h | 5 | ||||
-rw-r--r-- | net/mac80211/rc80211_pid_algo.c | 31 |
9 files changed, 63 insertions, 25 deletions
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index d448c9702a0f..387d4878af2f 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -567,11 +567,11 @@ static int lbs_process_bss(struct bss_descriptor *bss, | |||
567 | pos += 8; | 567 | pos += 8; |
568 | 568 | ||
569 | /* beacon interval is 2 bytes long */ | 569 | /* beacon interval is 2 bytes long */ |
570 | bss->beaconperiod = le16_to_cpup((void *) pos); | 570 | bss->beaconperiod = get_unaligned_le16(pos); |
571 | pos += 2; | 571 | pos += 2; |
572 | 572 | ||
573 | /* capability information is 2 bytes long */ | 573 | /* capability information is 2 bytes long */ |
574 | bss->capability = le16_to_cpup((void *) pos); | 574 | bss->capability = get_unaligned_le16(pos); |
575 | lbs_deb_scan("process_bss: capabilities 0x%04x\n", bss->capability); | 575 | lbs_deb_scan("process_bss: capabilities 0x%04x\n", bss->capability); |
576 | pos += 2; | 576 | pos += 2; |
577 | 577 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index 560b9c73c0b9..b36ed1c6c746 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -731,6 +731,17 @@ static int rt2400pci_init_registers(struct rt2x00_dev *rt2x00dev) | |||
731 | (rt2x00dev->rx->data_size / 128)); | 731 | (rt2x00dev->rx->data_size / 128)); |
732 | rt2x00pci_register_write(rt2x00dev, CSR9, reg); | 732 | rt2x00pci_register_write(rt2x00dev, CSR9, reg); |
733 | 733 | ||
734 | rt2x00pci_register_read(rt2x00dev, CSR14, ®); | ||
735 | rt2x00_set_field32(®, CSR14_TSF_COUNT, 0); | ||
736 | rt2x00_set_field32(®, CSR14_TSF_SYNC, 0); | ||
737 | rt2x00_set_field32(®, CSR14_TBCN, 0); | ||
738 | rt2x00_set_field32(®, CSR14_TCFP, 0); | ||
739 | rt2x00_set_field32(®, CSR14_TATIMW, 0); | ||
740 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 0); | ||
741 | rt2x00_set_field32(®, CSR14_CFP_COUNT_PRELOAD, 0); | ||
742 | rt2x00_set_field32(®, CSR14_TBCM_PRELOAD, 0); | ||
743 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); | ||
744 | |||
734 | rt2x00pci_register_write(rt2x00dev, CNT3, 0x3f080000); | 745 | rt2x00pci_register_write(rt2x00dev, CNT3, 0x3f080000); |
735 | 746 | ||
736 | rt2x00pci_register_read(rt2x00dev, ARCSR0, ®); | 747 | rt2x00pci_register_read(rt2x00dev, ARCSR0, ®); |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index a5ed54b69262..f7731fb82555 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -824,6 +824,17 @@ static int rt2500pci_init_registers(struct rt2x00_dev *rt2x00dev) | |||
824 | rt2x00_set_field32(®, CSR11_CW_SELECT, 0); | 824 | rt2x00_set_field32(®, CSR11_CW_SELECT, 0); |
825 | rt2x00pci_register_write(rt2x00dev, CSR11, reg); | 825 | rt2x00pci_register_write(rt2x00dev, CSR11, reg); |
826 | 826 | ||
827 | rt2x00pci_register_read(rt2x00dev, CSR14, ®); | ||
828 | rt2x00_set_field32(®, CSR14_TSF_COUNT, 0); | ||
829 | rt2x00_set_field32(®, CSR14_TSF_SYNC, 0); | ||
830 | rt2x00_set_field32(®, CSR14_TBCN, 0); | ||
831 | rt2x00_set_field32(®, CSR14_TCFP, 0); | ||
832 | rt2x00_set_field32(®, CSR14_TATIMW, 0); | ||
833 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 0); | ||
834 | rt2x00_set_field32(®, CSR14_CFP_COUNT_PRELOAD, 0); | ||
835 | rt2x00_set_field32(®, CSR14_TBCM_PRELOAD, 0); | ||
836 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); | ||
837 | |||
827 | rt2x00pci_register_write(rt2x00dev, CNT3, 0); | 838 | rt2x00pci_register_write(rt2x00dev, CNT3, 0); |
828 | 839 | ||
829 | rt2x00pci_register_read(rt2x00dev, TXCSR8, ®); | 840 | rt2x00pci_register_read(rt2x00dev, TXCSR8, ®); |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 61e59c17a60a..d90512f97b39 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -801,6 +801,13 @@ static int rt2500usb_init_registers(struct rt2x00_dev *rt2x00dev) | |||
801 | rt2x00_set_field16(®, TXRX_CSR8_BBP_ID1_VALID, 0); | 801 | rt2x00_set_field16(®, TXRX_CSR8_BBP_ID1_VALID, 0); |
802 | rt2500usb_register_write(rt2x00dev, TXRX_CSR8, reg); | 802 | rt2500usb_register_write(rt2x00dev, TXRX_CSR8, reg); |
803 | 803 | ||
804 | rt2500usb_register_read(rt2x00dev, TXRX_CSR19, ®); | ||
805 | rt2x00_set_field16(®, TXRX_CSR19_TSF_COUNT, 0); | ||
806 | rt2x00_set_field16(®, TXRX_CSR19_TSF_SYNC, 0); | ||
807 | rt2x00_set_field16(®, TXRX_CSR19_TBCN, 0); | ||
808 | rt2x00_set_field16(®, TXRX_CSR19_BEACON_GEN, 0); | ||
809 | rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg); | ||
810 | |||
804 | rt2500usb_register_write(rt2x00dev, TXRX_CSR21, 0xe78f); | 811 | rt2500usb_register_write(rt2x00dev, TXRX_CSR21, 0xe78f); |
805 | rt2500usb_register_write(rt2x00dev, MAC_CSR9, 0xff1d); | 812 | rt2500usb_register_write(rt2x00dev, MAC_CSR9, 0xff1d); |
806 | 813 | ||
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 14bc7b281659..c3afb5cbe807 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -1201,6 +1201,15 @@ static int rt61pci_init_registers(struct rt2x00_dev *rt2x00dev) | |||
1201 | rt2x00_set_field32(®, TXRX_CSR8_ACK_CTS_54MBS, 42); | 1201 | rt2x00_set_field32(®, TXRX_CSR8_ACK_CTS_54MBS, 42); |
1202 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR8, reg); | 1202 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR8, reg); |
1203 | 1203 | ||
1204 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, ®); | ||
1205 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_INTERVAL, 0); | ||
1206 | rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 0); | ||
1207 | rt2x00_set_field32(®, TXRX_CSR9_TSF_SYNC, 0); | ||
1208 | rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 0); | ||
1209 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0); | ||
1210 | rt2x00_set_field32(®, TXRX_CSR9_TIMESTAMP_COMPENSATE, 0); | ||
1211 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); | ||
1212 | |||
1204 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR15, 0x0000000f); | 1213 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR15, 0x0000000f); |
1205 | 1214 | ||
1206 | rt2x00pci_register_write(rt2x00dev, MAC_CSR6, 0x00000fff); | 1215 | rt2x00pci_register_write(rt2x00dev, MAC_CSR6, 0x00000fff); |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 83cc0147f698..46e9e081fbf1 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1006,6 +1006,15 @@ static int rt73usb_init_registers(struct rt2x00_dev *rt2x00dev) | |||
1006 | rt2x00_set_field32(®, TXRX_CSR8_ACK_CTS_54MBS, 42); | 1006 | rt2x00_set_field32(®, TXRX_CSR8_ACK_CTS_54MBS, 42); |
1007 | rt73usb_register_write(rt2x00dev, TXRX_CSR8, reg); | 1007 | rt73usb_register_write(rt2x00dev, TXRX_CSR8, reg); |
1008 | 1008 | ||
1009 | rt73usb_register_read(rt2x00dev, TXRX_CSR9, ®); | ||
1010 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_INTERVAL, 0); | ||
1011 | rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 0); | ||
1012 | rt2x00_set_field32(®, TXRX_CSR9_TSF_SYNC, 0); | ||
1013 | rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 0); | ||
1014 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0); | ||
1015 | rt2x00_set_field32(®, TXRX_CSR9_TIMESTAMP_COMPENSATE, 0); | ||
1016 | rt73usb_register_write(rt2x00dev, TXRX_CSR9, reg); | ||
1017 | |||
1009 | rt73usb_register_write(rt2x00dev, TXRX_CSR15, 0x0000000f); | 1018 | rt73usb_register_write(rt2x00dev, TXRX_CSR15, 0x0000000f); |
1010 | 1019 | ||
1011 | rt73usb_register_read(rt2x00dev, MAC_CSR6, ®); | 1020 | rt73usb_register_read(rt2x00dev, MAC_CSR6, ®); |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 418606ac1c3b..694e95d35fd4 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -765,6 +765,7 @@ static void zd_op_remove_interface(struct ieee80211_hw *hw, | |||
765 | { | 765 | { |
766 | struct zd_mac *mac = zd_hw_mac(hw); | 766 | struct zd_mac *mac = zd_hw_mac(hw); |
767 | mac->type = IEEE80211_IF_TYPE_INVALID; | 767 | mac->type = IEEE80211_IF_TYPE_INVALID; |
768 | zd_set_beacon_interval(&mac->chip, 0); | ||
768 | zd_write_mac_addr(&mac->chip, NULL); | 769 | zd_write_mac_addr(&mac->chip, NULL); |
769 | } | 770 | } |
770 | 771 | ||
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); |