Changeset 18915
- Timestamp:
- 04/04/12 15:39:59 (14 months ago)
- Location:
- src/router
- Files:
-
- 4 edited
-
httpd/visuals/dd-wrt.c (modified) (7 diffs)
-
httpd/visuals/setupassistant.c (modified) (5 diffs)
-
libutils/mac80211info.c (modified) (1 diff)
-
shared/wlutils.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/router/httpd/visuals/dd-wrt.c
r18888 r18915 4176 4176 #if defined(HAVE_MADWIFI_MIMO) || defined(HAVE_ATH9K) 4177 4177 if (is_ath11n(prefix)) { 4178 4179 #if defined(HAVE_ATH9K) 4180 if (has_ht40(prefix)) 4181 #endif 4178 4182 if ((nvram_nmatch("n-only", "%s_net_mode", prefix) 4179 4183 || nvram_nmatch("ng-only", "%s_net_mode", prefix) … … 4197 4201 || nvram_nmatch("na-only", "%s_net_mode", prefix)))) 4198 4202 #endif 4203 { 4204 #if defined(HAVE_ATH9K) 4205 if (has_ht40(prefix)) 4206 #endif 4199 4207 websWrite(wp, 4200 4208 "document.write(\"<option value=\\\"40\\\" %s >\" + share.turbo + \"</option>\");\n", 4201 4209 nvram_match(wl_width, 4202 4210 "40") ? "selected=\\\"selected\\\"" : ""); 4211 } 4203 4212 websWrite(wp, 4204 4213 "document.write(\"<option value=\\\"20\\\" %s >\" + share.full + \"</option>\");\n", 4205 4214 nvram_match(wl_width, 4206 4215 "20") ? "selected=\\\"selected\\\"" : ""); 4207 #ifdef HAVE_ATH9K 4208 } 4209 #endif 4210 #ifdef HAVE_ATH9K 4211 if (is_ath9k(prefix)) 4212 #endif 4213 { 4216 4217 #if defined(HAVE_MADWIFI_MIMO) || defined(HAVE_ATH9K) 4218 } 4219 #endif 4220 #if defined(HAVE_MADWIFI) || defined(HAVE_ATH9K) && !defined(HAVE_MADIFI_MIMO) 4221 { 4214 4222 websWrite(wp, 4215 4223 "document.write(\"<option value=\\\"10\\\" %s >\" + share.half + \"</option>\");\n", … … 4227 4235 #endif 4228 4236 } 4237 #endif 4229 4238 websWrite(wp, "//]]>\n</script>\n"); 4230 4239 websWrite(wp, "</select>\n"); … … 4823 4832 #if defined(HAVE_MADWIFI_MIMO) || defined(HAVE_ATH9K) 4824 4833 /* limit channel options by mode */ 4834 #if defined(HAVE_ATH9K) 4835 if (has_ht40(prefix)) 4836 #endif 4825 4837 if (is_ath11n(prefix)) { 4826 4838 if ((nvram_nmatch("n-only", "%s_net_mode", prefix) … … 4844 4856 || nvram_nmatch("na-only", "%s_net_mode", prefix)))) 4845 4857 #endif 4858 { 4859 #if defined(HAVE_ATH9K) 4860 if (has_ht40(prefix)) 4861 #endif 4846 4862 websWrite(wp, 4847 4863 "document.write(\"<option value=\\\"40\\\" %s >\" + share.turbo + \"</option>\");\n", 4848 4864 nvram_match(wl_width, 4849 4865 "40") ? "selected=\\\"selected\\\"" : ""); 4866 } 4850 4867 websWrite(wp, 4851 4868 "document.write(\"<option value=\\\"20\\\" %s >\" + share.full + \"</option>\");\n", 4852 4869 nvram_match(wl_width, 4853 4870 "20") ? "selected=\\\"selected\\\"" : ""); 4854 #ifdef HAVE_ATH9K 4855 if (is_ath9k(prefix)) 4856 #endif 4871 4872 #if defined(HAVE_MADWIFI) || defined(HAVE_ATH9K) && !defined(HAVE_MADIFI_MIMO) 4857 4873 { 4858 4874 websWrite(wp, … … 4864 4880 nvram_match(wl_width, 4865 4881 "5") ? "selected=\\\"selected\\\"" : ""); 4866 }4867 4882 #ifdef HAVE_SUBQUARTER 4868 4883 if(registered_has_subquarter()) { … … 4873 4888 "2") ? "selected=\\\"selected\\\"" : ""); 4874 4889 } 4890 #endif 4891 } 4875 4892 #endif 4876 4893 websWrite(wp, "//]]>\n</script>\n"); -
src/router/httpd/visuals/setupassistant.c
r17673 r18915 710 710 || nvram_selnmatch(wp, "n5-only", "%s_net_mode", prefix) 711 711 || nvram_selnmatch(wp, "na-only", "%s_net_mode", prefix))) 712 { 713 #if defined(HAVE_ATH9K) 714 if (has_ht40(prefix)) 715 #endif 712 716 websWrite(wp, 713 717 "document.write(\"<option value=\\\"2040\\\" %s >\" + share.dynamicturbo + \"</option>\");\n", … … 715 719 "2040") ? 716 720 "selected=\\\"selected\\\"" : ""); 721 } 717 722 } 718 723 if (!is_ath11n(prefix) … … 724 729 || nvram_selnmatch(wp, "na-only", "%s_net_mode", prefix)))) 725 730 #endif 731 { 732 #if defined(HAVE_ATH9K) 733 if (has_ht40(prefix)) 734 #endif 726 735 websWrite(wp, 727 736 "document.write(\"<option value=\\\"40\\\" %s >\" + share.turbo + \"</option>\");\n", … … 729 738 "40") ? "selected=\\\"selected\\\"" : 730 739 ""); 740 } 731 741 websWrite(wp, 732 742 "document.write(\"<option value=\\\"20\\\" %s >\" + share.full + \"</option>\");\n", 733 743 nvram_selmatch(wp, wl_width, 734 744 "20") ? "selected=\\\"selected\\\"" : ""); 735 #ifdef HAVE_ATH9K 736 if (!is_ath9k(prefix)) 737 #endif 745 #if defined(HAVE_MADWIFI) || defined(HAVE_ATH9K) && !defined(HAVE_MADIFI_MIMO) 738 746 { 739 747 websWrite(wp, … … 756 764 #endif 757 765 } 766 #endif 758 767 websWrite(wp, "//]]>\n</script>\n"); 759 768 websWrite(wp, "</select>\n"); -
src/router/libutils/mac80211info.c
r18914 r18915 649 649 } 650 650 651 652 int has_ht40(char *interface) { 653 struct wifi_channels *chan; 654 int found=0; 655 int i=0; 656 char regdomain[32]; 657 char *country; 658 659 sprintf(regdomain, "%s_regdomain", interface); 660 country = nvram_default_get(regdomain, "UNITED_STATES"); 661 662 chan = mac80211_get_channels(interface, getIsoName(country), 40, 0xff); 663 if (chan != NULL) 664 while (chan[i].freq != -1) { 665 if (chan[i].ht40plus || chan[i].ht40minus) { 666 free(chan); 667 return 1; 668 } 669 i++; 670 } 671 if (chan != NULL) 672 free(chan); 673 return 0; 674 } 675 676 651 677 int mac80211_check_valid_frequency(char *interface, char *country, int freq) { 652 678 struct wifi_channels *chan; -
src/router/shared/wlutils.h
r18905 r18915 96 96 extern int has_2ghz(char *prefix); 97 97 extern int has_5ghz(char *prefix); 98 extern int has_ht40(char *prefix); 98 99 99 100 #define SITE_SURVEY_DB "/tmp/site_survey"
Note: See TracChangeset
for help on using the changeset viewer.
