From 7e810011201bf926cba09ec07424893e4cd8ce67 Mon Sep 17 00:00:00 2001 From: Roman Yeryomin Date: Fri, 17 May 2013 20:40:24 +0300 Subject: Move to rsdk 3.2.4. Compiles cleanly. Signed-off-by: Roman Yeryomin --- .../drivers/net/wireless/rtl8192e/8192cd_comapi.h | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 target/linux/realtek/files/drivers/net/wireless/rtl8192e/8192cd_comapi.h (limited to 'target/linux/realtek/files/drivers/net/wireless/rtl8192e/8192cd_comapi.h') diff --git a/target/linux/realtek/files/drivers/net/wireless/rtl8192e/8192cd_comapi.h b/target/linux/realtek/files/drivers/net/wireless/rtl8192e/8192cd_comapi.h new file mode 100644 index 000000000..9377ad103 --- /dev/null +++ b/target/linux/realtek/files/drivers/net/wireless/rtl8192e/8192cd_comapi.h @@ -0,0 +1,83 @@ +/* + * Header file for API-compatible handling routines + * + * + * + * Copyright (c) 2009 Realtek Semiconductor Corp. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + + +#ifndef _8192CD_COMAPI_H_ +#define _8192CD_COMAPI_H_ + +#include "./8192cd.h" + +typedef struct rtl8192cd_priv RTL_PRIV; +#define MAX_CONFIG_FILE_SIZE (20*1024) // for 8192, added to 20k +#define MAX_PARAM_BUF_SIZE (1024) // for 8192, added to 20k + +#ifdef CONFIG_RTL_COMAPI_CFGFILE + +/* Following is a example for PARAMETERs completely compatible to other vendors' + * configure file - chris 2010/02/01 */ +#undef VENDOR_PARAM_COMPATIBLE +#ifdef VENDOR_PARAM_COMPATIBLE + +int Set_CountryRegion_Proc (RTL_PRIV *priv, char *arg); +int Set_CountryRegionABand_Proc (RTL_PRIV *priv, char *arg); +int Set_SSID_Proc (RTL_PRIV *priv, char *arg); + + +struct mib_cfg_func{ + char name[20]; /*mib name*/ + int (*set_proc)(RTL_PRIV *priv, char *arg); +}; + +static struct mib_cfg_func *TMP_MIBCFG, RTL_SUPPORT_MIBCFG[] = { + {"CountryRegion", Set_CountryRegion_Proc}, + {"CountryRegionABand", Set_CountryRegionABand_Proc}, + {"SSID", Set_SSID_Proc} +}; + +int Set_CountryRegion_Proc(RTL_PRIV *priv, char *arg) +{ + int val = simple_strtol(arg, 0 ,10); + if (DOMAIN_FCC <= val && val <= DOMAIN_MAX ) { + priv->pmib->dot11StationConfigEntry.dot11RegDomain = val; + return TRUE; + } else { + printk("contry region out of range [%d-%d]\n", DOMAIN_FCC, DOMAIN_MAX); + return FALSE; + } +} + +int Set_CountryRegionABand_Proc(RTL_PRIV *priv, char *arg) +{ + int val = simple_strtol(arg, 0 ,10); + priv->pmib->dot11StationConfigEntry.dot11RegDomainABand = val; + return TRUE; +} + +int Set_SSID_Proc(RTL_PRIV *priv, char *arg) +{ + strcpy(priv->pmib->dot11StationConfigEntry.dot11DesiredSSID, arg); + return TRUE; +} + +#else +extern int set_mib(struct rtl8192cd_priv *priv, unsigned char *data); + +#endif //VENDOR_PARAM_COMPATIBLE + +#endif //CONFIG_RTL_COMAPI_CFGFILE + + + +#endif // _8192CD_COMAPI_H_ + + + -- cgit v1.2.3