debug.c (82b2d334314c387ebd857b88a3d889c9a2cfec4a) | debug.c (f7e014dac29b1abe5c8fa8d721d43928633340ab) |
---|---|
1/* 2 * Copyright (c) 2008-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 1359 unchanged lines hidden (view full) --- 1368 struct ath9k_nfcal_hist *h; 1369 int i, j, qcuOffset = 0, dcuOffset = 0; 1370 u32 *qcuBase, *dcuBase, size = 30000, len = 0; 1371 u32 sampidx = 0; 1372 u8 *buf; 1373 u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask; 1374 u8 nread; 1375 | 1/* 2 * Copyright (c) 2008-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 1359 unchanged lines hidden (view full) --- 1368 struct ath9k_nfcal_hist *h; 1369 int i, j, qcuOffset = 0, dcuOffset = 0; 1370 u32 *qcuBase, *dcuBase, size = 30000, len = 0; 1371 u32 sampidx = 0; 1372 u8 *buf; 1373 u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask; 1374 u8 nread; 1375 |
1376 if (sc->sc_flags & SC_OP_INVALID) 1377 return -EAGAIN; 1378 |
|
1376 buf = vmalloc(size); 1377 if (!buf) 1378 return -ENOMEM; 1379 bb_mac_samp = vmalloc(sizeof(*bb_mac_samp) * ATH_DBG_MAX_SAMPLES); 1380 if (!bb_mac_samp) { 1381 vfree(buf); 1382 return -ENOMEM; 1383 } | 1379 buf = vmalloc(size); 1380 if (!buf) 1381 return -ENOMEM; 1382 bb_mac_samp = vmalloc(sizeof(*bb_mac_samp) * ATH_DBG_MAX_SAMPLES); 1383 if (!bb_mac_samp) { 1384 vfree(buf); 1385 return -ENOMEM; 1386 } |
1387 /* Account the current state too */ 1388 ath9k_debug_samp_bb_mac(sc); |
|
1384 1385 spin_lock_bh(&sc->debug.samp_lock); 1386 memcpy(bb_mac_samp, sc->debug.bb_mac_samp, 1387 sizeof(*bb_mac_samp) * ATH_DBG_MAX_SAMPLES); 1388 spin_unlock_bh(&sc->debug.samp_lock); 1389 1390 len += snprintf(buf + len, size - len, 1391 "Raw DMA Debug Dump:\n"); --- 252 unchanged lines hidden --- | 1389 1390 spin_lock_bh(&sc->debug.samp_lock); 1391 memcpy(bb_mac_samp, sc->debug.bb_mac_samp, 1392 sizeof(*bb_mac_samp) * ATH_DBG_MAX_SAMPLES); 1393 spin_unlock_bh(&sc->debug.samp_lock); 1394 1395 len += snprintf(buf + len, size - len, 1396 "Raw DMA Debug Dump:\n"); --- 252 unchanged lines hidden --- |