Commit 21f8a73f authored by Reinette Chatre's avatar Reinette Chatre Committed by John W. Linville

ipw2x00: fix sparse warnings

This fixes:

  CHECK   drivers/net/wireless/ipw2x00/ipw2100.c
drivers/net/wireless/ipw2x00/ipw2100.c:7888:22: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:188:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:7952:18: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:188:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:8000:18: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:188:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: originally declared here
  CC [M]  drivers/net/wireless/ipw2x00/ipw2100.o
  CHECK   drivers/net/wireless/ipw2x00/ipw2200.c
drivers/net/wireless/ipw2x00/ipw2200.c:847:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:891:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:935:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:980:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:1016:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:1051:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:1823:13: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:6228:28: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:6369:20: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:6857:12: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:87:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:7964:13: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:8720:12: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:9662:13: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:87:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:9720:13: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:87:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:9826:13: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:87:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:10318:21: warning: symbol 'remaining_bytes' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:10184:13: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:8338:45: warning: cast to restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:4414:21: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ipw2x00/ipw2200.c:4414:21:    expected restricted __le16 [usertype] size
drivers/net/wireless/ipw2x00/ipw2200.c:4414:21:    got unsigned short [unsigned] [usertype] <noident>
drivers/net/wireless/ipw2x00/ipw2200.c:6105:33: warning: incorrect type in initializer (different base types)
drivers/net/wireless/ipw2x00/ipw2200.c:6105:33:    expected restricted __le16 [usertype] tx_rates
drivers/net/wireless/ipw2x00/ipw2200.c:6105:33:    got unsigned short [unsigned] [usertype] rates_mask
drivers/net/wireless/ipw2x00/ipw2200.c:6124:29: warning: bad assignment (>>=) to restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6130:31: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6140:23: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6149:54: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6151:37: warning: invalid assignment: &=
drivers/net/wireless/ipw2x00/ipw2200.c:6151:37:    left side has type restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6151:37:    right side has type int
drivers/net/wireless/ipw2x00/ipw2200.c:6154:54: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6156:37: warning: invalid assignment: &=
drivers/net/wireless/ipw2x00/ipw2200.c:6156:37:    left side has type restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6156:37:    right side has type int
drivers/net/wireless/ipw2x00/ipw2200.c:6159:55: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6161:37: warning: invalid assignment: &=
drivers/net/wireless/ipw2x00/ipw2200.c:6161:37:    left side has type restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6161:37:    right side has type int
drivers/net/wireless/ipw2x00/ipw2200.c:6164:29: warning: invalid assignment: |=
drivers/net/wireless/ipw2x00/ipw2200.c:6164:29:    left side has type restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6164:29:    right side has type unsigned short
drivers/net/wireless/ipw2x00/ipw2200.c:7853:29: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ipw2x00/ipw2200.c:7853:29:    expected signed char [signed] [usertype] [explicitly-signed] rt_dbmnoise
drivers/net/wireless/ipw2x00/ipw2200.c:7853:29:    got restricted __le16 [usertype] noise
drivers/net/wireless/ipw2x00/ipw2200.c:7967:25: warning: incorrect type in initializer (different base types)
drivers/net/wireless/ipw2x00/ipw2200.c:7967:25:    expected signed char [signed] [usertype] [explicitly-signed] noise
drivers/net/wireless/ipw2x00/ipw2200.c:7967:25:    got restricted __le16 [usertype] noise
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Acked-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c8a61a7d
...@@ -185,7 +185,7 @@ MODULE_AUTHOR(DRV_COPYRIGHT); ...@@ -185,7 +185,7 @@ MODULE_AUTHOR(DRV_COPYRIGHT);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
static int debug = 0; static int debug = 0;
static int mode = 0; static int network_mode = 0;
static int channel = 0; static int channel = 0;
static int associate = 0; static int associate = 0;
static int disable = 0; static int disable = 0;
...@@ -195,7 +195,7 @@ static struct ipw2100_fw ipw2100_firmware; ...@@ -195,7 +195,7 @@ static struct ipw2100_fw ipw2100_firmware;
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
module_param(debug, int, 0444); module_param(debug, int, 0444);
module_param(mode, int, 0444); module_param_named(mode, network_mode, int, 0444);
module_param(channel, int, 0444); module_param(channel, int, 0444);
module_param(associate, int, 0444); module_param(associate, int, 0444);
module_param(disable, int, 0444); module_param(disable, int, 0444);
...@@ -2844,7 +2844,7 @@ static int __ipw2100_tx_process(struct ipw2100_priv *priv) ...@@ -2844,7 +2844,7 @@ static int __ipw2100_tx_process(struct ipw2100_priv *priv)
#ifdef CONFIG_IPW2100_DEBUG #ifdef CONFIG_IPW2100_DEBUG
{ {
int i = txq->oldest; i = txq->oldest;
IPW_DEBUG_TX("TX%d V=%p P=%04X T=%04X L=%d\n", i, IPW_DEBUG_TX("TX%d V=%p P=%04X T=%04X L=%d\n", i,
&txq->drv[i], &txq->drv[i],
(u32) (txq->nic + i * sizeof(struct ipw2100_bd)), (u32) (txq->nic + i * sizeof(struct ipw2100_bd)),
...@@ -6076,7 +6076,7 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, ...@@ -6076,7 +6076,7 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev,
priv->ieee->ieee802_1x = 1; priv->ieee->ieee802_1x = 1;
/* Set module parameters */ /* Set module parameters */
switch (mode) { switch (network_mode) {
case 1: case 1:
priv->ieee->iw_mode = IW_MODE_ADHOC; priv->ieee->iw_mode = IW_MODE_ADHOC;
break; break;
...@@ -8179,10 +8179,11 @@ static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device *dev) ...@@ -8179,10 +8179,11 @@ static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device *dev)
int rssi_qual; int rssi_qual;
int tx_qual; int tx_qual;
int beacon_qual; int beacon_qual;
int quality;
struct ipw2100_priv *priv = ieee80211_priv(dev); struct ipw2100_priv *priv = ieee80211_priv(dev);
struct iw_statistics *wstats; struct iw_statistics *wstats;
u32 rssi, quality, tx_retries, missed_beacons, tx_failures; u32 rssi, tx_retries, missed_beacons, tx_failures;
u32 ord_len = sizeof(u32); u32 ord_len = sizeof(u32);
if (!priv) if (!priv)
...@@ -8265,7 +8266,8 @@ static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device *dev) ...@@ -8265,7 +8266,8 @@ static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device *dev)
beacon_qual = (20 - missed_beacons) * beacon_qual = (20 - missed_beacons) *
(PERFECT - VERY_GOOD) / 20 + VERY_GOOD; (PERFECT - VERY_GOOD) / 20 + VERY_GOOD;
quality = min(beacon_qual, min(tx_qual, rssi_qual)); quality = min(tx_qual, rssi_qual);
quality = min(beacon_qual, quality);
#ifdef CONFIG_IPW2100_DEBUG #ifdef CONFIG_IPW2100_DEBUG
if (beacon_qual == quality) if (beacon_qual == quality)
......
...@@ -83,13 +83,13 @@ MODULE_LICENSE("GPL"); ...@@ -83,13 +83,13 @@ MODULE_LICENSE("GPL");
static int cmdlog = 0; static int cmdlog = 0;
static int debug = 0; static int debug = 0;
static int channel = 0; static int default_channel = 0;
static int mode = 0; static int network_mode = 0;
static u32 ipw_debug_level; static u32 ipw_debug_level;
static int associate; static int associate;
static int auto_create = 1; static int auto_create = 1;
static int led = 0; static int led_support = 0;
static int disable = 0; static int disable = 0;
static int bt_coexist = 0; static int bt_coexist = 0;
static int hwcrypto = 0; static int hwcrypto = 0;
...@@ -4265,9 +4265,10 @@ static void ipw_gather_stats(struct ipw_priv *priv) ...@@ -4265,9 +4265,10 @@ static void ipw_gather_stats(struct ipw_priv *priv)
IPW_DEBUG_STATS("Signal level : %3d%% (%d dBm)\n", IPW_DEBUG_STATS("Signal level : %3d%% (%d dBm)\n",
signal_quality, rssi); signal_quality, rssi);
quality = min(beacon_quality, quality = min(rx_quality, signal_quality);
min(rate_quality, quality = min(tx_quality, quality);
min(tx_quality, min(rx_quality, signal_quality)))); quality = min(rate_quality, quality);
quality = min(beacon_quality, quality);
if (quality == beacon_quality) if (quality == beacon_quality)
IPW_DEBUG_STATS("Quality (%d%%): Clamped to missed beacons.\n", IPW_DEBUG_STATS("Quality (%d%%): Clamped to missed beacons.\n",
quality); quality);
...@@ -4411,7 +4412,6 @@ static void ipw_rx_notification(struct ipw_priv *priv, ...@@ -4411,7 +4412,6 @@ static void ipw_rx_notification(struct ipw_priv *priv,
{ {
DECLARE_SSID_BUF(ssid); DECLARE_SSID_BUF(ssid);
u16 size = le16_to_cpu(notif->size); u16 size = le16_to_cpu(notif->size);
notif->size = le16_to_cpu(notif->size);
IPW_DEBUG_NOTIF("type = %i (%d bytes)\n", notif->subtype, size); IPW_DEBUG_NOTIF("type = %i (%d bytes)\n", notif->subtype, size);
...@@ -6101,11 +6101,10 @@ static void ipw_debug_config(struct ipw_priv *priv) ...@@ -6101,11 +6101,10 @@ static void ipw_debug_config(struct ipw_priv *priv)
static void ipw_set_fixed_rate(struct ipw_priv *priv, int mode) static void ipw_set_fixed_rate(struct ipw_priv *priv, int mode)
{ {
/* TODO: Verify that this works... */ /* TODO: Verify that this works... */
struct ipw_fixed_rate fr = { struct ipw_fixed_rate fr;
.tx_rates = priv->rates_mask
};
u32 reg; u32 reg;
u16 mask = 0; u16 mask = 0;
u16 new_tx_rates = priv->rates_mask;
/* Identify 'current FW band' and match it with the fixed /* Identify 'current FW band' and match it with the fixed
* Tx rates */ * Tx rates */
...@@ -6117,54 +6116,56 @@ static void ipw_set_fixed_rate(struct ipw_priv *priv, int mode) ...@@ -6117,54 +6116,56 @@ static void ipw_set_fixed_rate(struct ipw_priv *priv, int mode)
/* Invalid fixed rate mask */ /* Invalid fixed rate mask */
IPW_DEBUG_WX IPW_DEBUG_WX
("invalid fixed rate mask in ipw_set_fixed_rate\n"); ("invalid fixed rate mask in ipw_set_fixed_rate\n");
fr.tx_rates = 0; new_tx_rates = 0;
break; break;
} }
fr.tx_rates >>= IEEE80211_OFDM_SHIFT_MASK_A; new_tx_rates >>= IEEE80211_OFDM_SHIFT_MASK_A;
break; break;
default: /* 2.4Ghz or Mixed */ default: /* 2.4Ghz or Mixed */
/* IEEE_B */ /* IEEE_B */
if (mode == IEEE_B) { if (mode == IEEE_B) {
if (fr.tx_rates & ~IEEE80211_CCK_RATES_MASK) { if (new_tx_rates & ~IEEE80211_CCK_RATES_MASK) {
/* Invalid fixed rate mask */ /* Invalid fixed rate mask */
IPW_DEBUG_WX IPW_DEBUG_WX
("invalid fixed rate mask in ipw_set_fixed_rate\n"); ("invalid fixed rate mask in ipw_set_fixed_rate\n");
fr.tx_rates = 0; new_tx_rates = 0;
} }
break; break;
} }
/* IEEE_G */ /* IEEE_G */
if (fr.tx_rates & ~(IEEE80211_CCK_RATES_MASK | if (new_tx_rates & ~(IEEE80211_CCK_RATES_MASK |
IEEE80211_OFDM_RATES_MASK)) { IEEE80211_OFDM_RATES_MASK)) {
/* Invalid fixed rate mask */ /* Invalid fixed rate mask */
IPW_DEBUG_WX IPW_DEBUG_WX
("invalid fixed rate mask in ipw_set_fixed_rate\n"); ("invalid fixed rate mask in ipw_set_fixed_rate\n");
fr.tx_rates = 0; new_tx_rates = 0;
break; break;
} }
if (IEEE80211_OFDM_RATE_6MB_MASK & fr.tx_rates) { if (IEEE80211_OFDM_RATE_6MB_MASK & new_tx_rates) {
mask |= (IEEE80211_OFDM_RATE_6MB_MASK >> 1); mask |= (IEEE80211_OFDM_RATE_6MB_MASK >> 1);
fr.tx_rates &= ~IEEE80211_OFDM_RATE_6MB_MASK; new_tx_rates &= ~IEEE80211_OFDM_RATE_6MB_MASK;
} }
if (IEEE80211_OFDM_RATE_9MB_MASK & fr.tx_rates) { if (IEEE80211_OFDM_RATE_9MB_MASK & new_tx_rates) {
mask |= (IEEE80211_OFDM_RATE_9MB_MASK >> 1); mask |= (IEEE80211_OFDM_RATE_9MB_MASK >> 1);
fr.tx_rates &= ~IEEE80211_OFDM_RATE_9MB_MASK; new_tx_rates &= ~IEEE80211_OFDM_RATE_9MB_MASK;
} }
if (IEEE80211_OFDM_RATE_12MB_MASK & fr.tx_rates) { if (IEEE80211_OFDM_RATE_12MB_MASK & new_tx_rates) {
mask |= (IEEE80211_OFDM_RATE_12MB_MASK >> 1); mask |= (IEEE80211_OFDM_RATE_12MB_MASK >> 1);
fr.tx_rates &= ~IEEE80211_OFDM_RATE_12MB_MASK; new_tx_rates &= ~IEEE80211_OFDM_RATE_12MB_MASK;
} }
fr.tx_rates |= mask; new_tx_rates |= mask;
break; break;
} }
fr.tx_rates = cpu_to_le16(new_tx_rates);
reg = ipw_read32(priv, IPW_MEM_FIXED_OVERRIDE); reg = ipw_read32(priv, IPW_MEM_FIXED_OVERRIDE);
ipw_write_reg32(priv, reg, *(u32 *) & fr); ipw_write_reg32(priv, reg, *(u32 *) & fr);
} }
...@@ -7850,7 +7851,7 @@ static void ipw_handle_data_packet_monitor(struct ipw_priv *priv, ...@@ -7850,7 +7851,7 @@ static void ipw_handle_data_packet_monitor(struct ipw_priv *priv,
/* Convert signal to DBM */ /* Convert signal to DBM */
ipw_rt->rt_dbmsignal = antsignal; ipw_rt->rt_dbmsignal = antsignal;
ipw_rt->rt_dbmnoise = frame->noise; ipw_rt->rt_dbmnoise = (s8) le16_to_cpu(frame->noise);
/* Convert the channel data and set the flags */ /* Convert the channel data and set the flags */
ipw_rt->rt_channel = cpu_to_le16(ieee80211chan2mhz(received_channel)); ipw_rt->rt_channel = cpu_to_le16(ieee80211chan2mhz(received_channel));
...@@ -7964,7 +7965,7 @@ static void ipw_handle_promiscuous_rx(struct ipw_priv *priv, ...@@ -7964,7 +7965,7 @@ static void ipw_handle_promiscuous_rx(struct ipw_priv *priv,
u16 channel = frame->received_channel; u16 channel = frame->received_channel;
u8 phy_flags = frame->antennaAndPhy; u8 phy_flags = frame->antennaAndPhy;
s8 signal = frame->rssi_dbm - IPW_RSSI_TO_DBM; s8 signal = frame->rssi_dbm - IPW_RSSI_TO_DBM;
s8 noise = frame->noise; s8 noise = (s8) le16_to_cpu(frame->noise);
u8 rate = frame->rate; u8 rate = frame->rate;
short len = le16_to_cpu(pkt->u.frame.length); short len = le16_to_cpu(pkt->u.frame.length);
struct sk_buff *skb; struct sk_buff *skb;
...@@ -8335,7 +8336,7 @@ static void ipw_rx(struct ipw_priv *priv) ...@@ -8335,7 +8336,7 @@ static void ipw_rx(struct ipw_priv *priv)
.rssi = pkt->u.frame.rssi_dbm - .rssi = pkt->u.frame.rssi_dbm -
IPW_RSSI_TO_DBM, IPW_RSSI_TO_DBM,
.signal = .signal =
le16_to_cpu(pkt->u.frame.rssi_dbm) - pkt->u.frame.rssi_dbm -
IPW_RSSI_TO_DBM + 0x100, IPW_RSSI_TO_DBM + 0x100,
.noise = .noise =
le16_to_cpu(pkt->u.frame.noise), le16_to_cpu(pkt->u.frame.noise),
...@@ -8517,7 +8518,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option) ...@@ -8517,7 +8518,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option)
/* We default to disabling the LED code as right now it causes /* We default to disabling the LED code as right now it causes
* too many systems to lock up... */ * too many systems to lock up... */
if (!led) if (!led_support)
priv->config |= CFG_NO_LED; priv->config |= CFG_NO_LED;
if (associate) if (associate)
...@@ -8539,10 +8540,10 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option) ...@@ -8539,10 +8540,10 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option)
IPW_DEBUG_INFO("Radio disabled.\n"); IPW_DEBUG_INFO("Radio disabled.\n");
} }
if (channel != 0) { if (default_channel != 0) {
priv->config |= CFG_STATIC_CHANNEL; priv->config |= CFG_STATIC_CHANNEL;
priv->channel = channel; priv->channel = default_channel;
IPW_DEBUG_INFO("Bind to static channel %d\n", channel); IPW_DEBUG_INFO("Bind to static channel %d\n", default_channel);
/* TODO: Validate that provided channel is in range */ /* TODO: Validate that provided channel is in range */
} }
#ifdef CONFIG_IPW2200_QOS #ifdef CONFIG_IPW2200_QOS
...@@ -8550,7 +8551,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option) ...@@ -8550,7 +8551,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option)
burst_duration_CCK, burst_duration_OFDM); burst_duration_CCK, burst_duration_OFDM);
#endif /* CONFIG_IPW2200_QOS */ #endif /* CONFIG_IPW2200_QOS */
switch (mode) { switch (network_mode) {
case 1: case 1:
priv->ieee->iw_mode = IW_MODE_ADHOC; priv->ieee->iw_mode = IW_MODE_ADHOC;
priv->net_dev->type = ARPHRD_ETHER; priv->net_dev->type = ARPHRD_ETHER;
...@@ -10181,7 +10182,6 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, ...@@ -10181,7 +10182,6 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
#endif #endif
struct clx2_queue *q = &txq->q; struct clx2_queue *q = &txq->q;
u8 id, hdr_len, unicast; u8 id, hdr_len, unicast;
u16 remaining_bytes;
int fc; int fc;
if (!(priv->status & STATUS_ASSOCIATED)) if (!(priv->status & STATUS_ASSOCIATED))
...@@ -10220,7 +10220,6 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, ...@@ -10220,7 +10220,6 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
tfd->u.data.cmd_id = DINO_CMD_TX; tfd->u.data.cmd_id = DINO_CMD_TX;
tfd->u.data.len = cpu_to_le16(txb->payload_size); tfd->u.data.len = cpu_to_le16(txb->payload_size);
remaining_bytes = txb->payload_size;
if (priv->assoc_request.ieee_mode == IPW_B_MODE) if (priv->assoc_request.ieee_mode == IPW_B_MODE)
tfd->u.data.tx_flags_ext |= DCT_FLAG_EXT_MODE_CCK; tfd->u.data.tx_flags_ext |= DCT_FLAG_EXT_MODE_CCK;
...@@ -11946,13 +11945,13 @@ MODULE_PARM_DESC(associate, "auto associate when scanning (default off)"); ...@@ -11946,13 +11945,13 @@ MODULE_PARM_DESC(associate, "auto associate when scanning (default off)");
module_param(auto_create, int, 0444); module_param(auto_create, int, 0444);
MODULE_PARM_DESC(auto_create, "auto create adhoc network (default on)"); MODULE_PARM_DESC(auto_create, "auto create adhoc network (default on)");
module_param(led, int, 0444); module_param_named(led, led_support, int, 0444);
MODULE_PARM_DESC(led, "enable led control on some systems (default 0 off)"); MODULE_PARM_DESC(led, "enable led control on some systems (default 0 off)");
module_param(debug, int, 0444); module_param(debug, int, 0444);
MODULE_PARM_DESC(debug, "debug output mask"); MODULE_PARM_DESC(debug, "debug output mask");
module_param(channel, int, 0444); module_param_named(channel, default_channel, int, 0444);
MODULE_PARM_DESC(channel, "channel to limit associate to (default 0 [ANY])"); MODULE_PARM_DESC(channel, "channel to limit associate to (default 0 [ANY])");
#ifdef CONFIG_IPW2200_PROMISCUOUS #ifdef CONFIG_IPW2200_PROMISCUOUS
...@@ -11978,10 +11977,10 @@ MODULE_PARM_DESC(burst_duration_OFDM, "set OFDM burst value"); ...@@ -11978,10 +11977,10 @@ MODULE_PARM_DESC(burst_duration_OFDM, "set OFDM burst value");
#endif /* CONFIG_IPW2200_QOS */ #endif /* CONFIG_IPW2200_QOS */
#ifdef CONFIG_IPW2200_MONITOR #ifdef CONFIG_IPW2200_MONITOR
module_param(mode, int, 0444); module_param_named(mode, network_mode, int, 0444);
MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS,2=Monitor)"); MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS,2=Monitor)");
#else #else
module_param(mode, int, 0444); module_param_named(mode, network_mode, int, 0444);
MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS)"); MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS)");
#endif #endif
......
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