Commit 6ee9169b authored by Wolfram Sang's avatar Wolfram Sang Committed by Greg Kroah-Hartman

staging: ks7010: remove cfg file handling

I verified that all but two settings from the config file can be set up
also via 'iwconfig' or 'iwpriv'. The two missing are ROM_FILE and
PhyInformationTimer. ROM_FILE can be easily dropped. There is only one
known firmware floating on the net, so, the name is fix and we can make
this constant. Frankly, I don't know when PhyInformationTimer needs to
be set to non-zero. But if we need it somewhen, there is already
(currently commented out) code to add this as another private method, so
we could use that. Summa summarum: We can remove the config file
handling and the example config file. The only useful action,
initialization of the configuration struct, is now moved to the sdio
main file.
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0fd9da9a
obj-$(CONFIG_KS7010) += ks7010.o
ccflags-y += -DKS_WLAN_DEBUG=0
ks7010-y := michael_mic.o ks_hostif.o ks_wlan_net.o \
ks7010_sdio.o ks7010_config.o
ks7010-y := michael_mic.o ks_hostif.o ks_wlan_net.o ks7010_sdio.o
......@@ -26,7 +26,6 @@ Now the TODOs:
- fix codechecker warnings (checkpatch, sparse, smatch). But PLEASE make sure
that you are not only silencing the warning but really fixing code. You
should understand the change you submit.
- drop using a config file and use an upstream technique for configuration
- fix the 'card removal' event when card is inserted when booting
- check what other upstream wireless mechanisms can be used instead of the
custom ones here
......
This diff is collapsed.
......@@ -807,15 +807,10 @@ static int ks79xx_upload_firmware(struct ks_wlan_private *priv,
goto error_out0;
}
if (request_firmware
(&fw_entry, priv->reg.rom_file,
&priv->ks_wlan_hw.sdio_card->func->dev) != 0) {
DPRINTK(1, "error request_firmware() file=%s\n",
priv->reg.rom_file);
return 1;
}
DPRINTK(4, "success request_firmware() file=%s size=%zu\n",
priv->reg.rom_file, fw_entry->size);
retval = request_firmware(&fw_entry, ROM_FILE, &priv->ks_wlan_hw.sdio_card->func->dev);
if (retval)
return retval;
length = fw_entry->size;
/* Load Program */
......@@ -966,6 +961,33 @@ static struct sdio_driver ks7010_sdio_driver = {
extern int ks_wlan_net_start(struct net_device *dev);
extern int ks_wlan_net_stop(struct net_device *dev);
static void ks7010_init_defaults(struct ks_wlan_private *priv)
{
priv->reg.tx_rate = TX_RATE_AUTO;
priv->reg.preamble = LONG_PREAMBLE;
priv->reg.powermgt = POWMGT_ACTIVE_MODE;
priv->reg.scan_type = ACTIVE_SCAN;
priv->reg.beacon_lost_count = 20;
priv->reg.rts = 2347UL;
priv->reg.fragment = 2346UL;
priv->reg.phy_type = D_11BG_COMPATIBLE_MODE;
priv->reg.cts_mode = CTS_MODE_FALSE;
priv->reg.rate_set.body[11] = TX_RATE_54M;
priv->reg.rate_set.body[10] = TX_RATE_48M;
priv->reg.rate_set.body[9] = TX_RATE_36M;
priv->reg.rate_set.body[8] = TX_RATE_18M;
priv->reg.rate_set.body[7] = TX_RATE_9M;
priv->reg.rate_set.body[6] = TX_RATE_24M | BASIC_RATE;
priv->reg.rate_set.body[5] = TX_RATE_12M | BASIC_RATE;
priv->reg.rate_set.body[4] = TX_RATE_6M | BASIC_RATE;
priv->reg.rate_set.body[3] = TX_RATE_11M | BASIC_RATE;
priv->reg.rate_set.body[2] = TX_RATE_5M | BASIC_RATE;
priv->reg.rate_set.body[1] = TX_RATE_2M | BASIC_RATE;
priv->reg.rate_set.body[0] = TX_RATE_1M | BASIC_RATE;
priv->reg.tx_rate = TX_RATE_FULL_AUTO;
priv->reg.rate_set.size = 12;
}
static int ks7910_sdio_probe(struct sdio_func *func,
const struct sdio_device_id *device)
{
......@@ -1069,14 +1091,7 @@ static int ks7910_sdio_probe(struct sdio_func *func,
hostif_init(priv);
ks_wlan_net_start(netdev);
/* Read config file */
ret = ks_wlan_read_config_file(priv);
if (ret) {
printk(KERN_ERR
"ks79xx: read configuration file failed !! retern code = %d\n",
ret);
goto error_free_read_buf;
}
ks7010_init_defaults(priv);
/* Upload firmware */
ret = ks79xx_upload_firmware(priv, card); /* firmware load */
......
......@@ -142,7 +142,6 @@ struct rx_device {
spinlock_t rx_dev_lock;
};
#define ROM_FILE "ks7010sd.rom"
#define CFG_FILE "ks79xx.cfg"
#define KS_WLAN_DRIVER_VERSION_INFO "ks7010 sdio linux 007"
#endif /* _KS7010_SDIO_H */
#ks79xx.cfg
#KS79xx configuration file
#
#
#BeaconLostCount default 20
BeaconLostCount=20
#
#
#Ap List Scan Type default ACTIVE_SCAN ACTIVE_SCAN or PASSIVE_SCAN
ScanType=ACTIVE_SCAN
#
#
#Channel default 10 min 1 max 14
Channel=10
#
#
#FragmentThreshold default 2346 min 256 max 2346
FragmentThreshold=2346
#
#
#OperationMode default Infrastructure Pseudo-Ad-Hoc or 802.11-Ad-Hoc or Infrastructure
OperationMode=Infrastructure
#
#
#PowerManagementMode default ACTIVE ACTIVE or SAVE1 or SAVE2
PowerManagementMode=ACTIVE
#
#
#RTSThreshold default 2347 min 0 max 2347
RTSThreshold=2347
#
#
#SSID default "" max 32 character
SSID="default"
#
#
#TxRate default Auto 1, 2, 5.5, 11 ex. TxRate=1,2 TxRate=11 TxRate=Auto ...
TxRate=Auto
#
#
#Wep default OFF OFF or 64bit or 128bit
Wep=OFF
#
#
#WepType default STRING STRING or HEX
WepType=STRING
#
#
#WepIndex=1
#
#
#WepKeyValue1
# character_wep_key:64bit key_length = 5; 128bit key_length = 13
# hex_wep_key:64bit key_length = 10; 128bit key_length = 26
#
#
#WepKeyValue2
# character_wep_key:64bit key_length = 5; 128bit key_length = 13
# hex_wep_key:64bit key_length = 10; 128bit key_length = 26
#
#
#WepKeyValue3
# character_wep_key:64bit key_length = 5; 128bit key_length = 13
# hex_wep_key:64bit key_length = 10; 128bit key_length = 26
#
#
#WepKeyValue4
# character_wep_key:64bit key_length = 5; 128bit key_length = 13
# hex_wep_key:64bit key_length = 10; 128bit key_length = 26
#
#
#AuthenticationAlgorithm default OPEN_SYSTEM OPEN_SYSTEM or SHARED_KEY
AuthenticationAlgorithm=OPEN_SYSTEM
#
#
#PREAMBLE_TYPE default LONG LONG or SHORT
PREAMBLE_TYPE=SHORT
#
#
# PhyType default BG_MODE B_MODE, G_MODE or BG_MODE
PhyType=BG_MODE
#
#
# CtsMode defalut FALSE TURE or FALSE
CtsMode=FALSE
#
#
# PhyInformationTimer defalut 0 uint 100msec
PhyInformationTimer=0
#
#
#ROM_FILE default "ks7010sd.rom"
ROM_FILE="ks7010sd.rom"
#
......@@ -73,7 +73,6 @@ struct ks_wlan_parameter {
uint16_t phy_type; /* 11b/11g/11bg mode type */
uint16_t cts_mode; /* for 11g/11bg mode cts mode */
uint16_t phy_info_timer; /* phy information timer */
char rom_file[256];
};
enum {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment