aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy/main.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2009-04-01 11:42:36 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:54:40 -0400
commit910cfee363feda81cd5af4939ed9e0d27677b43f (patch)
tree087842da1c06d12aaed471b38800e329ac9af01a /drivers/net/wireless/b43legacy/main.c
parent66174bbea0b9c5bd4b7d060fed26bf5ec912c422 (diff)
b43legacy: Do not select HW_RANDOM
Auto-depend on HW_RANDOM, rather than "select"ing it. This way the user has the choice to enable or disable HWRNG support. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy/main.c')
-rw-r--r--drivers/net/wireless/b43legacy/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 879edc786713..81dbbc1c591a 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2297,6 +2297,7 @@ static void b43legacy_security_init(struct b43legacy_wldev *dev)
2297 dev->max_nr_keys - 8); 2297 dev->max_nr_keys - 8);
2298} 2298}
2299 2299
2300#ifdef CONFIG_B43LEGACY_HWRNG
2300static int b43legacy_rng_read(struct hwrng *rng, u32 *data) 2301static int b43legacy_rng_read(struct hwrng *rng, u32 *data)
2301{ 2302{
2302 struct b43legacy_wl *wl = (struct b43legacy_wl *)rng->priv; 2303 struct b43legacy_wl *wl = (struct b43legacy_wl *)rng->priv;
@@ -2312,17 +2313,21 @@ static int b43legacy_rng_read(struct hwrng *rng, u32 *data)
2312 2313
2313 return (sizeof(u16)); 2314 return (sizeof(u16));
2314} 2315}
2316#endif
2315 2317
2316static void b43legacy_rng_exit(struct b43legacy_wl *wl) 2318static void b43legacy_rng_exit(struct b43legacy_wl *wl)
2317{ 2319{
2320#ifdef CONFIG_B43LEGACY_HWRNG
2318 if (wl->rng_initialized) 2321 if (wl->rng_initialized)
2319 hwrng_unregister(&wl->rng); 2322 hwrng_unregister(&wl->rng);
2323#endif
2320} 2324}
2321 2325
2322static int b43legacy_rng_init(struct b43legacy_wl *wl) 2326static int b43legacy_rng_init(struct b43legacy_wl *wl)
2323{ 2327{
2324 int err; 2328 int err = 0;
2325 2329
2330#ifdef CONFIG_B43LEGACY_HWRNG
2326 snprintf(wl->rng_name, ARRAY_SIZE(wl->rng_name), 2331 snprintf(wl->rng_name, ARRAY_SIZE(wl->rng_name),
2327 "%s_%s", KBUILD_MODNAME, wiphy_name(wl->hw->wiphy)); 2332 "%s_%s", KBUILD_MODNAME, wiphy_name(wl->hw->wiphy));
2328 wl->rng.name = wl->rng_name; 2333 wl->rng.name = wl->rng_name;
@@ -2336,6 +2341,7 @@ static int b43legacy_rng_init(struct b43legacy_wl *wl)
2336 "number generator (%d)\n", err); 2341 "number generator (%d)\n", err);
2337 } 2342 }
2338 2343
2344#endif
2339 return err; 2345 return err;
2340} 2346}
2341 2347