diff options
author | Ramkumar Ramachandra <artagnon@gmail.com> | 2010-08-18 16:02:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-31 18:05:12 -0400 |
commit | 60ef9eb61c5f34cff03c0f3573c5a58d0a46eff1 (patch) | |
tree | 5ce465d6a9067097ac2503db2be814cee2f9505b /drivers/staging/rtl8192e/ieee80211 | |
parent | 4d9db977f9ac9b15f916888978026025c6cf9563 (diff) |
Staging: rtl8192e: Cleanup style and whitespace
Replace C99-style comments with C89-style comments, fix some typos,
and fix whitespace to use only tabs.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8192e/ieee80211')
-rw-r--r-- | drivers/staging/rtl8192e/ieee80211/ieee80211_module.c | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c index 7edf5c897a6..08bfdb1a4c6 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c | |||
@@ -69,7 +69,7 @@ static inline int ieee80211_networks_allocate(struct ieee80211_device *ieee) | |||
69 | GFP_KERNEL); | 69 | GFP_KERNEL); |
70 | if (!ieee->networks) { | 70 | if (!ieee->networks) { |
71 | printk(KERN_WARNING "%s: Out of memory allocating beacons\n", | 71 | printk(KERN_WARNING "%s: Out of memory allocating beacons\n", |
72 | ieee->dev->name); | 72 | ieee->dev->name); |
73 | return -ENOMEM; | 73 | return -ENOMEM; |
74 | } | 74 | } |
75 | 75 | ||
@@ -99,7 +99,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv) | |||
99 | { | 99 | { |
100 | struct ieee80211_device *ieee; | 100 | struct ieee80211_device *ieee; |
101 | struct net_device *dev; | 101 | struct net_device *dev; |
102 | int i,err; | 102 | int i, err; |
103 | 103 | ||
104 | IEEE80211_DEBUG_INFO("Initializing...\n"); | 104 | IEEE80211_DEBUG_INFO("Initializing...\n"); |
105 | 105 | ||
@@ -111,7 +111,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv) | |||
111 | 111 | ||
112 | ieee = netdev_priv(dev); | 112 | ieee = netdev_priv(dev); |
113 | 113 | ||
114 | memset(ieee, 0, sizeof(struct ieee80211_device)+sizeof_priv); | 114 | memset(ieee, 0, sizeof(struct ieee80211_device) + sizeof_priv); |
115 | ieee->dev = dev; | 115 | ieee->dev = dev; |
116 | 116 | ||
117 | err = ieee80211_networks_allocate(ieee); | 117 | err = ieee80211_networks_allocate(ieee); |
@@ -142,7 +142,8 @@ struct net_device *alloc_ieee80211(int sizeof_priv) | |||
142 | spin_lock_init(&ieee->wpax_suitlist_lock); | 142 | spin_lock_init(&ieee->wpax_suitlist_lock); |
143 | spin_lock_init(&ieee->bw_spinlock); | 143 | spin_lock_init(&ieee->bw_spinlock); |
144 | spin_lock_init(&ieee->reorder_spinlock); | 144 | spin_lock_init(&ieee->reorder_spinlock); |
145 | //added by WB | 145 | |
146 | /* added by WB */ | ||
146 | atomic_set(&(ieee->atm_chnlop), 0); | 147 | atomic_set(&(ieee->atm_chnlop), 0); |
147 | atomic_set(&(ieee->atm_swbw), 0); | 148 | atomic_set(&(ieee->atm_swbw), 0); |
148 | 149 | ||
@@ -153,8 +154,8 @@ struct net_device *alloc_ieee80211(int sizeof_priv) | |||
153 | ieee->privacy_invoked = 0; | 154 | ieee->privacy_invoked = 0; |
154 | ieee->ieee802_1x = 1; | 155 | ieee->ieee802_1x = 1; |
155 | ieee->raw_tx = 0; | 156 | ieee->raw_tx = 0; |
156 | //ieee->hwsec_support = 1; //default support hw security. //use module_param instead. | 157 | /* ieee->hwsec_support = 1; default support hw security: use module_param instead */ |
157 | ieee->hwsec_active = 0; //disable hwsec, switch it on when necessary. | 158 | ieee->hwsec_active = 0; /* disable hwsec, switch it on when necessary */ |
158 | 159 | ||
159 | ieee80211_softmac_init(ieee); | 160 | ieee80211_softmac_init(ieee); |
160 | 161 | ||
@@ -165,25 +166,25 @@ struct net_device *alloc_ieee80211(int sizeof_priv) | |||
165 | return NULL; | 166 | return NULL; |
166 | } | 167 | } |
167 | HTUpdateDefaultSetting(ieee); | 168 | HTUpdateDefaultSetting(ieee); |
168 | HTInitializeHTInfo(ieee); //may move to other place. | 169 | HTInitializeHTInfo(ieee); /* may move to other place */ |
169 | TSInitialize(ieee); | 170 | TSInitialize(ieee); |
170 | for (i = 0; i < IEEE_IBSS_MAC_HASH_SIZE; i++) | 171 | for (i = 0; i < IEEE_IBSS_MAC_HASH_SIZE; i++) |
171 | INIT_LIST_HEAD(&ieee->ibss_mac_hash[i]); | 172 | INIT_LIST_HEAD(&ieee->ibss_mac_hash[i]); |
172 | 173 | ||
173 | for (i = 0; i < 17; i++) { | 174 | for (i = 0; i < 17; i++) { |
174 | ieee->last_rxseq_num[i] = -1; | 175 | ieee->last_rxseq_num[i] = -1; |
175 | ieee->last_rxfrag_num[i] = -1; | 176 | ieee->last_rxfrag_num[i] = -1; |
176 | ieee->last_packet_time[i] = 0; | 177 | ieee->last_packet_time[i] = 0; |
177 | } | 178 | } |
178 | 179 | ||
179 | //These function were added to load crypte module autoly | 180 | /* Functions to load crypt module automatically */ |
180 | ieee80211_tkip_null(); | 181 | ieee80211_tkip_null(); |
181 | ieee80211_wep_null(); | 182 | ieee80211_wep_null(); |
182 | ieee80211_ccmp_null(); | 183 | ieee80211_ccmp_null(); |
183 | 184 | ||
184 | return dev; | 185 | return dev; |
185 | 186 | ||
186 | failed: | 187 | failed: |
187 | if (dev) | 188 | if (dev) |
188 | free_netdev(dev); | 189 | free_netdev(dev); |
189 | return NULL; | 190 | return NULL; |
@@ -222,35 +223,35 @@ void free_ieee80211(struct net_device *dev) | |||
222 | 223 | ||
223 | u32 ieee80211_debug_level = 0; | 224 | u32 ieee80211_debug_level = 0; |
224 | static int debug = \ | 225 | static int debug = \ |
225 | // IEEE80211_DL_INFO | | 226 | /* IEEE80211_DL_INFO | */ |
226 | // IEEE80211_DL_WX | | 227 | /* IEEE80211_DL_WX | */ |
227 | // IEEE80211_DL_SCAN | | 228 | /* IEEE80211_DL_SCAN | */ |
228 | // IEEE80211_DL_STATE | | 229 | /* IEEE80211_DL_STATE | */ |
229 | // IEEE80211_DL_MGMT | | 230 | /* IEEE80211_DL_MGMT | */ |
230 | // IEEE80211_DL_FRAG | | 231 | /* IEEE80211_DL_FRAG | */ |
231 | // IEEE80211_DL_EAP | | 232 | /* IEEE80211_DL_EAP | */ |
232 | // IEEE80211_DL_DROP | | 233 | /* IEEE80211_DL_DROP | */ |
233 | // IEEE80211_DL_TX | | 234 | /* IEEE80211_DL_TX | */ |
234 | // IEEE80211_DL_RX | | 235 | /* IEEE80211_DL_RX | */ |
235 | //IEEE80211_DL_QOS | | 236 | /* IEEE80211_DL_QOS | */ |
236 | // IEEE80211_DL_HT | | 237 | /* IEEE80211_DL_HT | */ |
237 | // IEEE80211_DL_TS | | 238 | /* IEEE80211_DL_TS | */ |
238 | // IEEE80211_DL_BA | | 239 | /* IEEE80211_DL_BA | */ |
239 | // IEEE80211_DL_REORDER| | 240 | /* IEEE80211_DL_REORDER | */ |
240 | // IEEE80211_DL_TRACE | | 241 | /* IEEE80211_DL_TRACE | */ |
241 | //IEEE80211_DL_DATA | | 242 | /* IEEE80211_DL_DATA | */ |
242 | IEEE80211_DL_ERR //awayls open this flags to show error out | 243 | IEEE80211_DL_ERR /* always open this flag to show error out */ |
243 | ; | 244 | ; |
244 | struct proc_dir_entry *ieee80211_proc = NULL; | 245 | struct proc_dir_entry *ieee80211_proc = NULL; |
245 | 246 | ||
246 | static int show_debug_level(char *page, char **start, off_t offset, | 247 | static int show_debug_level(char *page, char **start, off_t offset, |
247 | int count, int *eof, void *data) | 248 | int count, int *eof, void *data) |
248 | { | 249 | { |
249 | return snprintf(page, count, "0x%08X\n", ieee80211_debug_level); | 250 | return snprintf(page, count, "0x%08X\n", ieee80211_debug_level); |
250 | } | 251 | } |
251 | 252 | ||
252 | static int store_debug_level(struct file *file, const char *buffer, | 253 | static int store_debug_level(struct file *file, const char *buffer, |
253 | unsigned long count, void *data) | 254 | unsigned long count, void *data) |
254 | { | 255 | { |
255 | char buf[] = "0x00000000"; | 256 | char buf[] = "0x00000000"; |
256 | unsigned long len = min(sizeof(buf) - 1, (u32)count); | 257 | unsigned long len = min(sizeof(buf) - 1, (u32)count); |
@@ -269,7 +270,7 @@ static int store_debug_level(struct file *file, const char *buffer, | |||
269 | val = simple_strtoul(p, &p, 10); | 270 | val = simple_strtoul(p, &p, 10); |
270 | if (p == buf) | 271 | if (p == buf) |
271 | printk(KERN_INFO DRV_NAME | 272 | printk(KERN_INFO DRV_NAME |
272 | ": %s is not in hex or decimal form.\n", buf); | 273 | ": %s is not in hex or decimal form.\n", buf); |
273 | else | 274 | else |
274 | ieee80211_debug_level = val; | 275 | ieee80211_debug_level = val; |
275 | 276 | ||
@@ -320,7 +321,7 @@ int __init ieee80211_rtl_init(void) | |||
320 | return -EIO; | 321 | return -EIO; |
321 | } | 322 | } |
322 | e = create_proc_entry("debug_level", S_IFREG | S_IRUGO | S_IWUSR, | 323 | e = create_proc_entry("debug_level", S_IFREG | S_IRUGO | S_IWUSR, |
323 | ieee80211_proc); | 324 | ieee80211_proc); |
324 | if (!e) { | 325 | if (!e) { |
325 | remove_proc_entry(DRV_NAME, init_net.proc_net); | 326 | remove_proc_entry(DRV_NAME, init_net.proc_net); |
326 | ieee80211_proc = NULL; | 327 | ieee80211_proc = NULL; |