blob: 7038f0d3bde99ee4e114e40a77856d6b9badc056 [file] [log] [blame]
Charles Clément79566eb2010-06-21 10:39:51 -07001/*
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
23#ifndef _CHANNEL_H_
24#define _CHANNEL_H_
25
26#include "ttype.h"
27#include "card.h"
28
29/*--------------------- Export Classes ----------------------------*/
30
31typedef struct tagSChannelTblElement {
Charles Clément3fc9b582010-06-24 11:02:27 -070032 unsigned char byChannelNumber;
Charles Clément79566eb2010-06-21 10:39:51 -070033 unsigned int uFrequency;
Charles Clément7b6a0012010-08-01 17:15:50 +020034 bool bValid;
Charles Clément3fc9b582010-06-24 11:02:27 -070035 unsigned char byMAP;
Charles Clément79566eb2010-06-21 10:39:51 -070036}SChannelTblElement, *PSChannelTblElement;
37
38
39/*--------------------- Export Functions --------------------------*/
40
Charles Clément7b6a0012010-08-01 17:15:50 +020041bool is_channel_valid(unsigned int CountryCode);
Charles Clément79566eb2010-06-21 10:39:51 -070042void init_channel_table(void *pDeviceHandler);
Charles Clément3fc9b582010-06-24 11:02:27 -070043unsigned char get_channel_mapping(void *pDeviceHandler, unsigned char byChannelNumber, CARD_PHY_TYPE ePhyType);
Charles Clément7b6a0012010-08-01 17:15:50 +020044bool channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTable);
Charles Clément3fc9b582010-06-24 11:02:27 -070045unsigned char get_channel_number(void *pDeviceHandler, unsigned char byChannelIndex);
Charles Clément7b6a0012010-08-01 17:15:50 +020046bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel);
Charles Clément79566eb2010-06-21 10:39:51 -070047void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE);
Charles Clément3fc9b582010-06-24 11:02:27 -070048unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs);
Charles Clément79566eb2010-06-21 10:39:51 -070049void set_country_IE(void *pDeviceHandler, void *pIE);
Charles Clément7b6a0012010-08-01 17:15:50 +020050bool get_channel_map_info(void *pDeviceHandler, unsigned int uChannelIndex,
Charles Clément79566eb2010-06-21 10:39:51 -070051 unsigned char *pbyChannelNumber, unsigned char *pbyMap);
52void set_channel_map_info(void *pDeviceHandler, unsigned int uChannelIndex,
Charles Clément3fc9b582010-06-24 11:02:27 -070053 unsigned char byMap);
Charles Clément79566eb2010-06-21 10:39:51 -070054void clear_channel_map_info(void *pDeviceHandler);
Charles Clément3fc9b582010-06-24 11:02:27 -070055unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType);
Charles Clément79566eb2010-06-21 10:39:51 -070056
57
58#endif /* _CHANNEL_H_ */