aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2400pci.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2013-02-13 08:27:05 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-02-14 14:24:07 -0500
commit4ea545d476d3182056aeb042c439237ed61d261e (patch)
treea216861969701e1f48e64d829caf700966088980 /drivers/net/wireless/rt2x00/rt2400pci.c
parent52301a815e81cdcbcf971ba28df0376dc7f3961c (diff)
rt2x00: check for dma mappings errors
Check output of dma_map_single functions which nowadays can fail (when IOMMU is used). On write_beacon callbacks just print error, similar like padding error is handled by rt2800_write_beacon. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2400pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index a2d2bc2c7b3d..221beaaa83f1 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1185,8 +1185,14 @@ static void rt2400pci_write_beacon(struct queue_entry *entry,
1185 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 0); 1185 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 0);
1186 rt2x00pci_register_write(rt2x00dev, CSR14, reg); 1186 rt2x00pci_register_write(rt2x00dev, CSR14, reg);
1187 1187
1188 rt2x00queue_map_txskb(entry); 1188 if (rt2x00queue_map_txskb(entry)) {
1189 1189 ERROR(rt2x00dev, "Fail to map beacon, aborting\n");
1190 goto out;
1191 }
1192 /*
1193 * Enable beaconing again.
1194 */
1195 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 1);
1190 /* 1196 /*
1191 * Write the TX descriptor for the beacon. 1197 * Write the TX descriptor for the beacon.
1192 */ 1198 */
@@ -1196,7 +1202,7 @@ static void rt2400pci_write_beacon(struct queue_entry *entry,
1196 * Dump beacon to userspace through debugfs. 1202 * Dump beacon to userspace through debugfs.
1197 */ 1203 */
1198 rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb); 1204 rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb);
1199 1205out:
1200 /* 1206 /*
1201 * Enable beaconing again. 1207 * Enable beaconing again.
1202 */ 1208 */