Changeset 19024
- Timestamp:
- 04/13/12 13:58:21 (13 months ago)
- File:
-
- 1 edited
-
src/router/libutils/wl.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/router/libutils/wl.c
r19023 r19024 594 594 #else 595 595 596 #ifndef CHSPEC_IS40 597 598 #define WL_CHANSPEC_CTL_SB_MASK 0x0300 599 #define WL_CHANSPEC_CTL_SB_LOWER 0x0100 600 #define WL_CHANSPEC_CTL_SB_UPPER 0x0200 601 602 #define WL_CHANSPEC_BW_MASK 0x0C00 603 #define WL_CHANSPEC_BW_40 0x0C00 604 605 #define CHSPEC_CHANNEL(chspec) ((uint8)(chspec & 0xff)) 606 607 #define CHSPEC_IS40(chspec) (((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_40) 608 #define CHSPEC_SB_UPPER(chspec) ((chspec & WL_CHANSPEC_CTL_SB_MASK) == WL_CHANSPEC_CTL_SB_UPPER) 609 #define CHSPEC_SB_LOWER(chspec) ((chspec & WL_CHANSPEC_CTL_SB_MASK) == WL_CHANSPEC_CTL_SB_LOWER) 610 #endif 611 596 612 static int getcenterchannel(chanspec_t chspec) 597 613 { 598 614 const char *band; 599 615 uint ctl_chan; 600 616 int channel; 601 617 channel = CHSPEC_CHANNEL(chspec); 602 618 /* check for non-default band spec */ 619 603 620 if (CHSPEC_IS40(chspec)) { 604 621 if (CHSPEC_SB_UPPER(chspec)) { … … 608 625 } 609 626 } 627 return channel; 610 628 } 611 629 #endif … … 662 680 else if (nvram_nmatch("10", "wl%d_nbw", wl)) 663 681 mask = WL_CHANSPEC_BW_10; 682 #ifdef WL_CHANSPEC_BW_5 664 683 else if (nvram_nmatch("5", "wl%d_nbw", wl)) 665 684 mask = WL_CHANSPEC_BW_5; 685 #endif 666 686 667 687 if (bw > 20) {
Note: See TracChangeset
for help on using the changeset viewer.
