channel.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
  3. * All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along
  16. * with this program; if not, write to the Free Software Foundation, Inc.,
  17. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  18. *
  19. * File: channel.h
  20. *
  21. */
  22. #ifndef _CHANNEL_H_
  23. #define _CHANNEL_H_
  24. #include "ttype.h"
  25. #include "card.h"
  26. /*--------------------- Export Classes ----------------------------*/
  27. typedef struct tagSChannelTblElement {
  28. unsigned char byChannelNumber;
  29. unsigned int uFrequency;
  30. bool bValid;
  31. unsigned char byMAP;
  32. }SChannelTblElement, *PSChannelTblElement;
  33. /*--------------------- Export Functions --------------------------*/
  34. bool is_channel_valid(unsigned int CountryCode);
  35. void init_channel_table(void *pDeviceHandler);
  36. unsigned char get_channel_mapping(void *pDeviceHandler, unsigned char byChannelNumber, CARD_PHY_TYPE ePhyType);
  37. bool channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTable);
  38. unsigned char get_channel_number(void *pDeviceHandler, unsigned char byChannelIndex);
  39. bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel);
  40. void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE);
  41. unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs);
  42. void set_country_IE(void *pDeviceHandler, void *pIE);
  43. bool get_channel_map_info(void *pDeviceHandler, unsigned int uChannelIndex,
  44. unsigned char *pbyChannelNumber, unsigned char *pbyMap);
  45. void set_channel_map_info(void *pDeviceHandler, unsigned int uChannelIndex,
  46. unsigned char byMap);
  47. void clear_channel_map_info(void *pDeviceHandler);
  48. unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType);
  49. #endif /* _CHANNEL_H_ */