From ea510e4bdd672b72d0350198538e697e471fafd4 Mon Sep 17 00:00:00 2001 From: Sujith Manoharan Date: Wed, 22 Feb 2012 12:40:09 +0530 Subject: ath9k: Cleanup MCI init/deinit routines This patch simplifies the buffer allocation functions for MCI and removes unneeded memset calls. Also, a couple of unused variables are removed and a memory leak in DMA allocation is fixed. [ 1263.788267] WARNING: at /home/sujith/dev/wireless-testing/lib/dma-debug.c:875 check_unmap+0x173/0x7e0() [ 1263.788273] ath9k 0000:06:00.0: DMA-API: device driver frees DMA memory with different size [device address=0x0000000071908000] [map size=512 bytes] [unmap size=256 bytes] [ 1263.788345] Pid: 774, comm: rmmod Tainted: G W O 3.3.0-rc3-wl #18 [ 1263.788348] Call Trace: [ 1263.788355] [] warn_slowpath_common+0x7f/0xc0 [ 1263.788359] [] warn_slowpath_fmt+0x46/0x50 [ 1263.788363] [] check_unmap+0x173/0x7e0 [ 1263.788368] [] ? prio_tree_left+0x32/0xc0 [ 1263.788373] [] debug_dma_free_coherent+0x6d/0x80 [ 1263.788381] [] ath_mci_cleanup+0x7c/0x110 [ath9k] [ 1263.788387] [] ath9k_deinit_softc+0x113/0x120 [ath9k] [ 1263.788392] [] ath9k_deinit_device+0x5c/0x70 [ath9k] [ 1263.788397] [] ath_pci_remove+0x54/0xa0 [ath9k] [ 1263.788401] [] pci_device_remove+0x46/0x110 [ 1263.788406] [] __device_release_driver+0x7c/0xe0 [ 1263.788410] [] driver_detach+0xd0/0xe0 [ 1263.788414] [] bus_remove_driver+0x88/0xe0 [ 1263.788418] [] driver_unregister+0x62/0xa0 [ 1263.788421] [] pci_unregister_driver+0x44/0xc0 [ 1263.788427] [] ath_pci_exit+0x15/0x20 [ath9k] [ 1263.788432] [] ath9k_exit+0x15/0x31 [ath9k] [ 1263.788436] [] sys_delete_module+0x18c/0x270 [ 1263.788441] [] ? retint_swapgs+0x13/0x1b [ 1263.788446] [] ? trace_hardirqs_on_thunk+0x3a/0x3f [ 1263.788450] [] system_call_fastpath+0x16/0x1b [ 1263.788453] ---[ end trace 3ab4d030ffde40d4 ]--- Signed-off-by: Sujith Manoharan Signed-off-by: John W. Linville --- drivers/net/wireless/ath/ath9k/mci.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/net/wireless/ath/ath9k/mci.h') diff --git a/drivers/net/wireless/ath/ath9k/mci.h b/drivers/net/wireless/ath/ath9k/mci.h index 29e3e51..b805bf2 100644 --- a/drivers/net/wireless/ath/ath9k/mci.h +++ b/drivers/net/wireless/ath/ath9k/mci.h @@ -113,7 +113,6 @@ struct ath_mci_profile { u8 num_bdr; }; - struct ath_mci_buf { void *bf_addr; /* virtual addr of desc */ dma_addr_t bf_paddr; /* physical addr of buffer */ @@ -121,10 +120,8 @@ struct ath_mci_buf { }; struct ath_mci_coex { - atomic_t mci_cal_flag; struct ath_mci_buf sched_buf; struct ath_mci_buf gpm_buf; - u32 bt_cal_start; }; void ath_mci_flush_profile(struct ath_mci_profile *mci); -- cgit v1.1