Ignore:
Timestamp:
04/04/12 15:39:59 (14 months ago)
Author:
BrainSlayer
Message:

disallow ht40 selection if country or regulatory setting does not support these modes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/libutils/mac80211info.c

    r18914 r18915  
    649649} 
    650650 
     651 
     652int 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 
    651677int mac80211_check_valid_frequency(char *interface, char *country, int freq) { 
    652678                struct wifi_channels *chan; 
Note: See TracChangeset for help on using the changeset viewer.