diff options
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 56 |
1 files changed, 41 insertions, 15 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index a1186525c70d..1aec160e3d2f 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -322,59 +322,83 @@ static int b43_ratelimit(struct b43_wl *wl) | |||
322 | 322 | ||
323 | void b43info(struct b43_wl *wl, const char *fmt, ...) | 323 | void b43info(struct b43_wl *wl, const char *fmt, ...) |
324 | { | 324 | { |
325 | struct va_format vaf; | ||
325 | va_list args; | 326 | va_list args; |
326 | 327 | ||
327 | if (b43_modparam_verbose < B43_VERBOSITY_INFO) | 328 | if (b43_modparam_verbose < B43_VERBOSITY_INFO) |
328 | return; | 329 | return; |
329 | if (!b43_ratelimit(wl)) | 330 | if (!b43_ratelimit(wl)) |
330 | return; | 331 | return; |
332 | |||
331 | va_start(args, fmt); | 333 | va_start(args, fmt); |
332 | printk(KERN_INFO "b43-%s: ", | 334 | |
333 | (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan"); | 335 | vaf.fmt = fmt; |
334 | vprintk(fmt, args); | 336 | vaf.va = &args; |
337 | |||
338 | printk(KERN_INFO "b43-%s: %pV", | ||
339 | (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf); | ||
340 | |||
335 | va_end(args); | 341 | va_end(args); |
336 | } | 342 | } |
337 | 343 | ||
338 | void b43err(struct b43_wl *wl, const char *fmt, ...) | 344 | void b43err(struct b43_wl *wl, const char *fmt, ...) |
339 | { | 345 | { |
346 | struct va_format vaf; | ||
340 | va_list args; | 347 | va_list args; |
341 | 348 | ||
342 | if (b43_modparam_verbose < B43_VERBOSITY_ERROR) | 349 | if (b43_modparam_verbose < B43_VERBOSITY_ERROR) |
343 | return; | 350 | return; |
344 | if (!b43_ratelimit(wl)) | 351 | if (!b43_ratelimit(wl)) |
345 | return; | 352 | return; |
353 | |||
346 | va_start(args, fmt); | 354 | va_start(args, fmt); |
347 | printk(KERN_ERR "b43-%s ERROR: ", | 355 | |
348 | (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan"); | 356 | vaf.fmt = fmt; |
349 | vprintk(fmt, args); | 357 | vaf.va = &args; |
358 | |||
359 | printk(KERN_ERR "b43-%s ERROR: %pV", | ||
360 | (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf); | ||
361 | |||
350 | va_end(args); | 362 | va_end(args); |
351 | } | 363 | } |
352 | 364 | ||
353 | void b43warn(struct b43_wl *wl, const char *fmt, ...) | 365 | void b43warn(struct b43_wl *wl, const char *fmt, ...) |
354 | { | 366 | { |
367 | struct va_format vaf; | ||
355 | va_list args; | 368 | va_list args; |
356 | 369 | ||
357 | if (b43_modparam_verbose < B43_VERBOSITY_WARN) | 370 | if (b43_modparam_verbose < B43_VERBOSITY_WARN) |
358 | return; | 371 | return; |
359 | if (!b43_ratelimit(wl)) | 372 | if (!b43_ratelimit(wl)) |
360 | return; | 373 | return; |
374 | |||
361 | va_start(args, fmt); | 375 | va_start(args, fmt); |
362 | printk(KERN_WARNING "b43-%s warning: ", | 376 | |
363 | (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan"); | 377 | vaf.fmt = fmt; |
364 | vprintk(fmt, args); | 378 | vaf.va = &args; |
379 | |||
380 | printk(KERN_WARNING "b43-%s warning: %pV", | ||
381 | (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf); | ||
382 | |||
365 | va_end(args); | 383 | va_end(args); |
366 | } | 384 | } |
367 | 385 | ||
368 | void b43dbg(struct b43_wl *wl, const char *fmt, ...) | 386 | void b43dbg(struct b43_wl *wl, const char *fmt, ...) |
369 | { | 387 | { |
388 | struct va_format vaf; | ||
370 | va_list args; | 389 | va_list args; |
371 | 390 | ||
372 | if (b43_modparam_verbose < B43_VERBOSITY_DEBUG) | 391 | if (b43_modparam_verbose < B43_VERBOSITY_DEBUG) |
373 | return; | 392 | return; |
393 | |||
374 | va_start(args, fmt); | 394 | va_start(args, fmt); |
375 | printk(KERN_DEBUG "b43-%s debug: ", | 395 | |
376 | (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan"); | 396 | vaf.fmt = fmt; |
377 | vprintk(fmt, args); | 397 | vaf.va = &args; |
398 | |||
399 | printk(KERN_DEBUG "b43-%s debug: %pV", | ||
400 | (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf); | ||
401 | |||
378 | va_end(args); | 402 | va_end(args); |
379 | } | 403 | } |
380 | 404 | ||
@@ -1126,6 +1150,8 @@ void b43_wireless_core_reset(struct b43_wldev *dev, u32 flags) | |||
1126 | 1150 | ||
1127 | flags |= B43_TMSLOW_PHYCLKEN; | 1151 | flags |= B43_TMSLOW_PHYCLKEN; |
1128 | flags |= B43_TMSLOW_PHYRESET; | 1152 | flags |= B43_TMSLOW_PHYRESET; |
1153 | if (dev->phy.type == B43_PHYTYPE_N) | ||
1154 | flags |= B43_TMSLOW_PHY_BANDWIDTH_20MHZ; /* Make 20 MHz def */ | ||
1129 | ssb_device_enable(dev->dev, flags); | 1155 | ssb_device_enable(dev->dev, flags); |
1130 | msleep(2); /* Wait for the PLL to turn on. */ | 1156 | msleep(2); /* Wait for the PLL to turn on. */ |
1131 | 1157 | ||
@@ -4022,9 +4048,9 @@ static int b43_phy_versioning(struct b43_wldev *dev) | |||
4022 | if (phy_rev > 9) | 4048 | if (phy_rev > 9) |
4023 | unsupported = 1; | 4049 | unsupported = 1; |
4024 | break; | 4050 | break; |
4025 | #ifdef CONFIG_B43_NPHY | 4051 | #ifdef CONFIG_B43_PHY_N |
4026 | case B43_PHYTYPE_N: | 4052 | case B43_PHYTYPE_N: |
4027 | if (phy_rev > 4) | 4053 | if (phy_rev > 2) |
4028 | unsupported = 1; | 4054 | unsupported = 1; |
4029 | break; | 4055 | break; |
4030 | #endif | 4056 | #endif |
@@ -5067,7 +5093,7 @@ static void b43_print_driverinfo(void) | |||
5067 | #ifdef CONFIG_B43_PCMCIA | 5093 | #ifdef CONFIG_B43_PCMCIA |
5068 | feat_pcmcia = "M"; | 5094 | feat_pcmcia = "M"; |
5069 | #endif | 5095 | #endif |
5070 | #ifdef CONFIG_B43_NPHY | 5096 | #ifdef CONFIG_B43_PHY_N |
5071 | feat_nphy = "N"; | 5097 | feat_nphy = "N"; |
5072 | #endif | 5098 | #endif |
5073 | #ifdef CONFIG_B43_LEDS | 5099 | #ifdef CONFIG_B43_LEDS |