diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2009-08-18 13:25:05 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-20 11:36:04 -0400 |
commit | 21f8a73f829797eb7ebc12202b4c68e10e751ddb (patch) | |
tree | d6dff1fbb1d1b5994cff092c34a9c8c1d8ea304e /drivers/net/wireless/ipw2x00 | |
parent | c8a61a7d33350eeec668fc6230ad55f5fa93209b (diff) |
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: Reinette Chatre <reinette.chatre@intel.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ipw2x00')
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2100.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2200.c | 73 |
2 files changed, 44 insertions, 43 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index 742432388ca3..dee50ed0897d 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c | |||
@@ -185,7 +185,7 @@ MODULE_AUTHOR(DRV_COPYRIGHT); | |||
185 | MODULE_LICENSE("GPL"); | 185 | MODULE_LICENSE("GPL"); |
186 | 186 | ||
187 | static int debug = 0; | 187 | static int debug = 0; |
188 | static int mode = 0; | 188 | static int network_mode = 0; |
189 | static int channel = 0; | 189 | static int channel = 0; |
190 | static int associate = 0; | 190 | static int associate = 0; |
191 | static int disable = 0; | 191 | static int disable = 0; |
@@ -195,7 +195,7 @@ static struct ipw2100_fw ipw2100_firmware; | |||
195 | 195 | ||
196 | #include <linux/moduleparam.h> | 196 | #include <linux/moduleparam.h> |
197 | module_param(debug, int, 0444); | 197 | module_param(debug, int, 0444); |
198 | module_param(mode, int, 0444); | 198 | module_param_named(mode, network_mode, int, 0444); |
199 | module_param(channel, int, 0444); | 199 | module_param(channel, int, 0444); |
200 | module_param(associate, int, 0444); | 200 | module_param(associate, int, 0444); |
201 | module_param(disable, int, 0444); | 201 | module_param(disable, int, 0444); |
@@ -2844,7 +2844,7 @@ static int __ipw2100_tx_process(struct ipw2100_priv *priv) | |||
2844 | 2844 | ||
2845 | #ifdef CONFIG_IPW2100_DEBUG | 2845 | #ifdef CONFIG_IPW2100_DEBUG |
2846 | { | 2846 | { |
2847 | int i = txq->oldest; | 2847 | i = txq->oldest; |
2848 | IPW_DEBUG_TX("TX%d V=%p P=%04X T=%04X L=%d\n", i, | 2848 | IPW_DEBUG_TX("TX%d V=%p P=%04X T=%04X L=%d\n", i, |
2849 | &txq->drv[i], | 2849 | &txq->drv[i], |
2850 | (u32) (txq->nic + i * sizeof(struct ipw2100_bd)), | 2850 | (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 | priv->ieee->ieee802_1x = 1; | 6076 | priv->ieee->ieee802_1x = 1; |
6077 | 6077 | ||
6078 | /* Set module parameters */ | 6078 | /* Set module parameters */ |
6079 | switch (mode) { | 6079 | switch (network_mode) { |
6080 | case 1: | 6080 | case 1: |
6081 | priv->ieee->iw_mode = IW_MODE_ADHOC; | 6081 | priv->ieee->iw_mode = IW_MODE_ADHOC; |
6082 | break; | 6082 | break; |
@@ -8179,10 +8179,11 @@ static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device *dev) | |||
8179 | int rssi_qual; | 8179 | int rssi_qual; |
8180 | int tx_qual; | 8180 | int tx_qual; |
8181 | int beacon_qual; | 8181 | int beacon_qual; |
8182 | int quality; | ||
8182 | 8183 | ||
8183 | struct ipw2100_priv *priv = ieee80211_priv(dev); | 8184 | struct ipw2100_priv *priv = ieee80211_priv(dev); |
8184 | struct iw_statistics *wstats; | 8185 | struct iw_statistics *wstats; |
8185 | u32 rssi, quality, tx_retries, missed_beacons, tx_failures; | 8186 | u32 rssi, tx_retries, missed_beacons, tx_failures; |
8186 | u32 ord_len = sizeof(u32); | 8187 | u32 ord_len = sizeof(u32); |
8187 | 8188 | ||
8188 | if (!priv) | 8189 | if (!priv) |
@@ -8265,7 +8266,8 @@ static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device *dev) | |||
8265 | beacon_qual = (20 - missed_beacons) * | 8266 | beacon_qual = (20 - missed_beacons) * |
8266 | (PERFECT - VERY_GOOD) / 20 + VERY_GOOD; | 8267 | (PERFECT - VERY_GOOD) / 20 + VERY_GOOD; |
8267 | 8268 | ||
8268 | quality = min(beacon_qual, min(tx_qual, rssi_qual)); | 8269 | quality = min(tx_qual, rssi_qual); |
8270 | quality = min(beacon_qual, quality); | ||
8269 | 8271 | ||
8270 | #ifdef CONFIG_IPW2100_DEBUG | 8272 | #ifdef CONFIG_IPW2100_DEBUG |
8271 | if (beacon_qual == quality) | 8273 | if (beacon_qual == quality) |
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 07f171c4d30e..8e18d5348350 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -83,13 +83,13 @@ MODULE_LICENSE("GPL"); | |||
83 | 83 | ||
84 | static int cmdlog = 0; | 84 | static int cmdlog = 0; |
85 | static int debug = 0; | 85 | static int debug = 0; |
86 | static int channel = 0; | 86 | static int default_channel = 0; |
87 | static int mode = 0; | 87 | static int network_mode = 0; |
88 | 88 | ||
89 | static u32 ipw_debug_level; | 89 | static u32 ipw_debug_level; |
90 | static int associate; | 90 | static int associate; |
91 | static int auto_create = 1; | 91 | static int auto_create = 1; |
92 | static int led = 0; | 92 | static int led_support = 0; |
93 | static int disable = 0; | 93 | static int disable = 0; |
94 | static int bt_coexist = 0; | 94 | static int bt_coexist = 0; |
95 | static int hwcrypto = 0; | 95 | static int hwcrypto = 0; |
@@ -4265,9 +4265,10 @@ static void ipw_gather_stats(struct ipw_priv *priv) | |||
4265 | IPW_DEBUG_STATS("Signal level : %3d%% (%d dBm)\n", | 4265 | IPW_DEBUG_STATS("Signal level : %3d%% (%d dBm)\n", |
4266 | signal_quality, rssi); | 4266 | signal_quality, rssi); |
4267 | 4267 | ||
4268 | quality = min(beacon_quality, | 4268 | quality = min(rx_quality, signal_quality); |
4269 | min(rate_quality, | 4269 | quality = min(tx_quality, quality); |
4270 | min(tx_quality, min(rx_quality, signal_quality)))); | 4270 | quality = min(rate_quality, quality); |
4271 | quality = min(beacon_quality, quality); | ||
4271 | if (quality == beacon_quality) | 4272 | if (quality == beacon_quality) |
4272 | IPW_DEBUG_STATS("Quality (%d%%): Clamped to missed beacons.\n", | 4273 | IPW_DEBUG_STATS("Quality (%d%%): Clamped to missed beacons.\n", |
4273 | quality); | 4274 | quality); |
@@ -4411,7 +4412,6 @@ static void ipw_rx_notification(struct ipw_priv *priv, | |||
4411 | { | 4412 | { |
4412 | DECLARE_SSID_BUF(ssid); | 4413 | DECLARE_SSID_BUF(ssid); |
4413 | u16 size = le16_to_cpu(notif->size); | 4414 | u16 size = le16_to_cpu(notif->size); |
4414 | notif->size = le16_to_cpu(notif->size); | ||
4415 | 4415 | ||
4416 | IPW_DEBUG_NOTIF("type = %i (%d bytes)\n", notif->subtype, size); | 4416 | IPW_DEBUG_NOTIF("type = %i (%d bytes)\n", notif->subtype, size); |
4417 | 4417 | ||
@@ -6101,11 +6101,10 @@ static void ipw_debug_config(struct ipw_priv *priv) | |||
6101 | static void ipw_set_fixed_rate(struct ipw_priv *priv, int mode) | 6101 | static void ipw_set_fixed_rate(struct ipw_priv *priv, int mode) |
6102 | { | 6102 | { |
6103 | /* TODO: Verify that this works... */ | 6103 | /* TODO: Verify that this works... */ |
6104 | struct ipw_fixed_rate fr = { | 6104 | struct ipw_fixed_rate fr; |
6105 | .tx_rates = priv->rates_mask | ||
6106 | }; | ||
6107 | u32 reg; | 6105 | u32 reg; |
6108 | u16 mask = 0; | 6106 | u16 mask = 0; |
6107 | u16 new_tx_rates = priv->rates_mask; | ||
6109 | 6108 | ||
6110 | /* Identify 'current FW band' and match it with the fixed | 6109 | /* Identify 'current FW band' and match it with the fixed |
6111 | * Tx rates */ | 6110 | * Tx rates */ |
@@ -6117,54 +6116,56 @@ static void ipw_set_fixed_rate(struct ipw_priv *priv, int mode) | |||
6117 | /* Invalid fixed rate mask */ | 6116 | /* Invalid fixed rate mask */ |
6118 | IPW_DEBUG_WX | 6117 | IPW_DEBUG_WX |
6119 | ("invalid fixed rate mask in ipw_set_fixed_rate\n"); | 6118 | ("invalid fixed rate mask in ipw_set_fixed_rate\n"); |
6120 | fr.tx_rates = 0; | 6119 | new_tx_rates = 0; |
6121 | break; | 6120 | break; |
6122 | } | 6121 | } |
6123 | 6122 | ||
6124 | fr.tx_rates >>= IEEE80211_OFDM_SHIFT_MASK_A; | 6123 | new_tx_rates >>= IEEE80211_OFDM_SHIFT_MASK_A; |
6125 | break; | 6124 | break; |
6126 | 6125 | ||
6127 | default: /* 2.4Ghz or Mixed */ | 6126 | default: /* 2.4Ghz or Mixed */ |
6128 | /* IEEE_B */ | 6127 | /* IEEE_B */ |
6129 | if (mode == IEEE_B) { | 6128 | if (mode == IEEE_B) { |
6130 | if (fr.tx_rates & ~IEEE80211_CCK_RATES_MASK) { | 6129 | if (new_tx_rates & ~IEEE80211_CCK_RATES_MASK) { |
6131 | /* Invalid fixed rate mask */ | 6130 | /* Invalid fixed rate mask */ |
6132 | IPW_DEBUG_WX | 6131 | IPW_DEBUG_WX |
6133 | ("invalid fixed rate mask in ipw_set_fixed_rate\n"); | 6132 | ("invalid fixed rate mask in ipw_set_fixed_rate\n"); |
6134 | fr.tx_rates = 0; | 6133 | new_tx_rates = 0; |
6135 | } | 6134 | } |
6136 | break; | 6135 | break; |
6137 | } | 6136 | } |
6138 | 6137 | ||
6139 | /* IEEE_G */ | 6138 | /* IEEE_G */ |
6140 | if (fr.tx_rates & ~(IEEE80211_CCK_RATES_MASK | | 6139 | if (new_tx_rates & ~(IEEE80211_CCK_RATES_MASK | |
6141 | IEEE80211_OFDM_RATES_MASK)) { | 6140 | IEEE80211_OFDM_RATES_MASK)) { |
6142 | /* Invalid fixed rate mask */ | 6141 | /* Invalid fixed rate mask */ |
6143 | IPW_DEBUG_WX | 6142 | IPW_DEBUG_WX |
6144 | ("invalid fixed rate mask in ipw_set_fixed_rate\n"); | 6143 | ("invalid fixed rate mask in ipw_set_fixed_rate\n"); |
6145 | fr.tx_rates = 0; | 6144 | new_tx_rates = 0; |
6146 | break; | 6145 | break; |
6147 | } | 6146 | } |
6148 | 6147 | ||
6149 | if (IEEE80211_OFDM_RATE_6MB_MASK & fr.tx_rates) { | 6148 | if (IEEE80211_OFDM_RATE_6MB_MASK & new_tx_rates) { |
6150 | mask |= (IEEE80211_OFDM_RATE_6MB_MASK >> 1); | 6149 | mask |= (IEEE80211_OFDM_RATE_6MB_MASK >> 1); |
6151 | fr.tx_rates &= ~IEEE80211_OFDM_RATE_6MB_MASK; | 6150 | new_tx_rates &= ~IEEE80211_OFDM_RATE_6MB_MASK; |
6152 | } | 6151 | } |
6153 | 6152 | ||
6154 | if (IEEE80211_OFDM_RATE_9MB_MASK & fr.tx_rates) { | 6153 | if (IEEE80211_OFDM_RATE_9MB_MASK & new_tx_rates) { |
6155 | mask |= (IEEE80211_OFDM_RATE_9MB_MASK >> 1); | 6154 | mask |= (IEEE80211_OFDM_RATE_9MB_MASK >> 1); |
6156 | fr.tx_rates &= ~IEEE80211_OFDM_RATE_9MB_MASK; | 6155 | new_tx_rates &= ~IEEE80211_OFDM_RATE_9MB_MASK; |
6157 | } | 6156 | } |
6158 | 6157 | ||
6159 | if (IEEE80211_OFDM_RATE_12MB_MASK & fr.tx_rates) { | 6158 | if (IEEE80211_OFDM_RATE_12MB_MASK & new_tx_rates) { |
6160 | mask |= (IEEE80211_OFDM_RATE_12MB_MASK >> 1); | 6159 | mask |= (IEEE80211_OFDM_RATE_12MB_MASK >> 1); |
6161 | fr.tx_rates &= ~IEEE80211_OFDM_RATE_12MB_MASK; | 6160 | new_tx_rates &= ~IEEE80211_OFDM_RATE_12MB_MASK; |
6162 | } | 6161 | } |
6163 | 6162 | ||
6164 | fr.tx_rates |= mask; | 6163 | new_tx_rates |= mask; |
6165 | break; | 6164 | break; |
6166 | } | 6165 | } |
6167 | 6166 | ||
6167 | fr.tx_rates = cpu_to_le16(new_tx_rates); | ||
6168 | |||
6168 | reg = ipw_read32(priv, IPW_MEM_FIXED_OVERRIDE); | 6169 | reg = ipw_read32(priv, IPW_MEM_FIXED_OVERRIDE); |
6169 | ipw_write_reg32(priv, reg, *(u32 *) & fr); | 6170 | ipw_write_reg32(priv, reg, *(u32 *) & fr); |
6170 | } | 6171 | } |
@@ -7850,7 +7851,7 @@ static void ipw_handle_data_packet_monitor(struct ipw_priv *priv, | |||
7850 | 7851 | ||
7851 | /* Convert signal to DBM */ | 7852 | /* Convert signal to DBM */ |
7852 | ipw_rt->rt_dbmsignal = antsignal; | 7853 | ipw_rt->rt_dbmsignal = antsignal; |
7853 | ipw_rt->rt_dbmnoise = frame->noise; | 7854 | ipw_rt->rt_dbmnoise = (s8) le16_to_cpu(frame->noise); |
7854 | 7855 | ||
7855 | /* Convert the channel data and set the flags */ | 7856 | /* Convert the channel data and set the flags */ |
7856 | ipw_rt->rt_channel = cpu_to_le16(ieee80211chan2mhz(received_channel)); | 7857 | 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 | u16 channel = frame->received_channel; | 7965 | u16 channel = frame->received_channel; |
7965 | u8 phy_flags = frame->antennaAndPhy; | 7966 | u8 phy_flags = frame->antennaAndPhy; |
7966 | s8 signal = frame->rssi_dbm - IPW_RSSI_TO_DBM; | 7967 | s8 signal = frame->rssi_dbm - IPW_RSSI_TO_DBM; |
7967 | s8 noise = frame->noise; | 7968 | s8 noise = (s8) le16_to_cpu(frame->noise); |
7968 | u8 rate = frame->rate; | 7969 | u8 rate = frame->rate; |
7969 | short len = le16_to_cpu(pkt->u.frame.length); | 7970 | short len = le16_to_cpu(pkt->u.frame.length); |
7970 | struct sk_buff *skb; | 7971 | struct sk_buff *skb; |
@@ -8335,7 +8336,7 @@ static void ipw_rx(struct ipw_priv *priv) | |||
8335 | .rssi = pkt->u.frame.rssi_dbm - | 8336 | .rssi = pkt->u.frame.rssi_dbm - |
8336 | IPW_RSSI_TO_DBM, | 8337 | IPW_RSSI_TO_DBM, |
8337 | .signal = | 8338 | .signal = |
8338 | le16_to_cpu(pkt->u.frame.rssi_dbm) - | 8339 | pkt->u.frame.rssi_dbm - |
8339 | IPW_RSSI_TO_DBM + 0x100, | 8340 | IPW_RSSI_TO_DBM + 0x100, |
8340 | .noise = | 8341 | .noise = |
8341 | le16_to_cpu(pkt->u.frame.noise), | 8342 | le16_to_cpu(pkt->u.frame.noise), |
@@ -8517,7 +8518,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option) | |||
8517 | 8518 | ||
8518 | /* We default to disabling the LED code as right now it causes | 8519 | /* We default to disabling the LED code as right now it causes |
8519 | * too many systems to lock up... */ | 8520 | * too many systems to lock up... */ |
8520 | if (!led) | 8521 | if (!led_support) |
8521 | priv->config |= CFG_NO_LED; | 8522 | priv->config |= CFG_NO_LED; |
8522 | 8523 | ||
8523 | if (associate) | 8524 | if (associate) |
@@ -8539,10 +8540,10 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option) | |||
8539 | IPW_DEBUG_INFO("Radio disabled.\n"); | 8540 | IPW_DEBUG_INFO("Radio disabled.\n"); |
8540 | } | 8541 | } |
8541 | 8542 | ||
8542 | if (channel != 0) { | 8543 | if (default_channel != 0) { |
8543 | priv->config |= CFG_STATIC_CHANNEL; | 8544 | priv->config |= CFG_STATIC_CHANNEL; |
8544 | priv->channel = channel; | 8545 | priv->channel = default_channel; |
8545 | IPW_DEBUG_INFO("Bind to static channel %d\n", channel); | 8546 | IPW_DEBUG_INFO("Bind to static channel %d\n", default_channel); |
8546 | /* TODO: Validate that provided channel is in range */ | 8547 | /* TODO: Validate that provided channel is in range */ |
8547 | } | 8548 | } |
8548 | #ifdef CONFIG_IPW2200_QOS | 8549 | #ifdef CONFIG_IPW2200_QOS |
@@ -8550,7 +8551,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option) | |||
8550 | burst_duration_CCK, burst_duration_OFDM); | 8551 | burst_duration_CCK, burst_duration_OFDM); |
8551 | #endif /* CONFIG_IPW2200_QOS */ | 8552 | #endif /* CONFIG_IPW2200_QOS */ |
8552 | 8553 | ||
8553 | switch (mode) { | 8554 | switch (network_mode) { |
8554 | case 1: | 8555 | case 1: |
8555 | priv->ieee->iw_mode = IW_MODE_ADHOC; | 8556 | priv->ieee->iw_mode = IW_MODE_ADHOC; |
8556 | priv->net_dev->type = ARPHRD_ETHER; | 8557 | priv->net_dev->type = ARPHRD_ETHER; |
@@ -10181,7 +10182,6 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, | |||
10181 | #endif | 10182 | #endif |
10182 | struct clx2_queue *q = &txq->q; | 10183 | struct clx2_queue *q = &txq->q; |
10183 | u8 id, hdr_len, unicast; | 10184 | u8 id, hdr_len, unicast; |
10184 | u16 remaining_bytes; | ||
10185 | int fc; | 10185 | int fc; |
10186 | 10186 | ||
10187 | if (!(priv->status & STATUS_ASSOCIATED)) | 10187 | if (!(priv->status & STATUS_ASSOCIATED)) |
@@ -10220,7 +10220,6 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, | |||
10220 | 10220 | ||
10221 | tfd->u.data.cmd_id = DINO_CMD_TX; | 10221 | tfd->u.data.cmd_id = DINO_CMD_TX; |
10222 | tfd->u.data.len = cpu_to_le16(txb->payload_size); | 10222 | tfd->u.data.len = cpu_to_le16(txb->payload_size); |
10223 | remaining_bytes = txb->payload_size; | ||
10224 | 10223 | ||
10225 | if (priv->assoc_request.ieee_mode == IPW_B_MODE) | 10224 | if (priv->assoc_request.ieee_mode == IPW_B_MODE) |
10226 | tfd->u.data.tx_flags_ext |= DCT_FLAG_EXT_MODE_CCK; | 10225 | 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 | module_param(auto_create, int, 0444); | 11945 | module_param(auto_create, int, 0444); |
11947 | MODULE_PARM_DESC(auto_create, "auto create adhoc network (default on)"); | 11946 | MODULE_PARM_DESC(auto_create, "auto create adhoc network (default on)"); |
11948 | 11947 | ||
11949 | module_param(led, int, 0444); | 11948 | module_param_named(led, led_support, int, 0444); |
11950 | MODULE_PARM_DESC(led, "enable led control on some systems (default 0 off)"); | 11949 | MODULE_PARM_DESC(led, "enable led control on some systems (default 0 off)"); |
11951 | 11950 | ||
11952 | module_param(debug, int, 0444); | 11951 | module_param(debug, int, 0444); |
11953 | MODULE_PARM_DESC(debug, "debug output mask"); | 11952 | MODULE_PARM_DESC(debug, "debug output mask"); |
11954 | 11953 | ||
11955 | module_param(channel, int, 0444); | 11954 | module_param_named(channel, default_channel, int, 0444); |
11956 | MODULE_PARM_DESC(channel, "channel to limit associate to (default 0 [ANY])"); | 11955 | MODULE_PARM_DESC(channel, "channel to limit associate to (default 0 [ANY])"); |
11957 | 11956 | ||
11958 | #ifdef CONFIG_IPW2200_PROMISCUOUS | 11957 | #ifdef CONFIG_IPW2200_PROMISCUOUS |
@@ -11978,10 +11977,10 @@ MODULE_PARM_DESC(burst_duration_OFDM, "set OFDM burst value"); | |||
11978 | #endif /* CONFIG_IPW2200_QOS */ | 11977 | #endif /* CONFIG_IPW2200_QOS */ |
11979 | 11978 | ||
11980 | #ifdef CONFIG_IPW2200_MONITOR | 11979 | #ifdef CONFIG_IPW2200_MONITOR |
11981 | module_param(mode, int, 0444); | 11980 | module_param_named(mode, network_mode, int, 0444); |
11982 | MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS,2=Monitor)"); | 11981 | MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS,2=Monitor)"); |
11983 | #else | 11982 | #else |
11984 | module_param(mode, int, 0444); | 11983 | module_param_named(mode, network_mode, int, 0444); |
11985 | MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS)"); | 11984 | MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS)"); |
11986 | #endif | 11985 | #endif |
11987 | 11986 | ||