1 This patch is submitted upstream and can be removed when it hits compat-wireless.
7 --- a/drivers/net/wireless/b43/b43.h
8 +++ b/drivers/net/wireless/b43/b43.h
9 @@ -625,9 +625,11 @@ struct b43_wl {
10 /* Stats about the wireless interface */
11 struct ieee80211_low_level_stats ieee_stats;
13 +#ifdef CONFIG_B43_HWRNG
16 + bool rng_initialized;
17 char rng_name[30 + 1];
18 +#endif /* CONFIG_B43_HWRNG */
20 /* The RF-kill button */
21 struct b43_rfkill rfkill;
22 --- a/drivers/net/wireless/b43/main.c
23 +++ b/drivers/net/wireless/b43/main.c
24 @@ -2980,6 +2980,7 @@ static void b43_security_init(struct b43
28 +#ifdef CONFIG_B43_HWRNG
29 static int b43_rng_read(struct hwrng *rng, u32 *data)
31 struct b43_wl *wl = (struct b43_wl *)rng->priv;
32 @@ -2995,17 +2996,21 @@ static int b43_rng_read(struct hwrng *rn
36 +#endif /* CONFIG_B43_HWRNG */
38 static void b43_rng_exit(struct b43_wl *wl)
40 +#ifdef CONFIG_B43_HWRNG
41 if (wl->rng_initialized)
42 hwrng_unregister(&wl->rng);
43 +#endif /* CONFIG_B43_HWRNG */
46 static int b43_rng_init(struct b43_wl *wl)
51 +#ifdef CONFIG_B43_HWRNG
52 snprintf(wl->rng_name, ARRAY_SIZE(wl->rng_name),
53 "%s_%s", KBUILD_MODNAME, wiphy_name(wl->hw->wiphy));
54 wl->rng.name = wl->rng_name;
55 @@ -3018,6 +3023,7 @@ static int b43_rng_init(struct b43_wl *w
56 b43err(wl, "Failed to register the random "
57 "number generator (%d)\n", err);
59 +#endif /* CONFIG_B43_HWRNG */
65 @@ -148,6 +148,7 @@ CONFIG_ATH9K_DEBUG=y
71 # CONFIG_B43_FORCE_PIO=y