diff options
author | Senthil Balasubramanian <senthilkumar@atheros.com> | 2009-03-06 11:24:08 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-16 18:09:30 -0400 |
commit | f0e6ce13c17afd74a49e0ef043d72581562f73ae (patch) | |
tree | 51882c6e4718a898b7592d4cc7e4c13679ae2f3b /drivers/net/wireless/ath9k/main.c | |
parent | ec329acef99ded8dad59e1ef8a5a02b823083353 (diff) | |
download | blackbird-op-linux-f0e6ce13c17afd74a49e0ef043d72581562f73ae.tar.gz blackbird-op-linux-f0e6ce13c17afd74a49e0ef043d72581562f73ae.zip |
ath9k: Get rid of unnecessary ATOMIC memory alloc during init time
We can sleep for memory during init time and so allocating rx buffers,
descriptro buffers with GFP_KERNEL should help us to get rid of transient
alloc fails.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index bb30ccca1843..4bc43db9ab22 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c @@ -1804,7 +1804,7 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, /* allocate descriptors */ dd->dd_desc = dma_alloc_coherent(sc->dev, dd->dd_desc_len, - &dd->dd_desc_paddr, GFP_ATOMIC); + &dd->dd_desc_paddr, GFP_KERNEL); if (dd->dd_desc == NULL) { error = -ENOMEM; goto fail; @@ -1816,12 +1816,11 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, /* allocate buffers */ bsize = sizeof(struct ath_buf) * nbuf; - bf = kmalloc(bsize, GFP_KERNEL); + bf = kzalloc(bsize, GFP_KERNEL); if (bf == NULL) { error = -ENOMEM; goto fail2; } - memset(bf, 0, bsize); dd->dd_bufptr = bf; INIT_LIST_HEAD(head); |