aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/usb.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/usb.c32
1 files changed, 26 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c
index 3740c3d6ab88..62bcc0d5bc23 100644
--- a/drivers/net/wireless/ath/ath6kl/usb.c
+++ b/drivers/net/wireless/ath/ath6kl/usb.c
@@ -185,9 +185,10 @@ static int ath6kl_usb_alloc_pipe_resources(struct ath6kl_usb_pipe *pipe,
185 for (i = 0; i < urb_cnt; i++) { 185 for (i = 0; i < urb_cnt; i++) {
186 urb_context = kzalloc(sizeof(struct ath6kl_urb_context), 186 urb_context = kzalloc(sizeof(struct ath6kl_urb_context),
187 GFP_KERNEL); 187 GFP_KERNEL);
188 if (urb_context == NULL) 188 if (urb_context == NULL) {
189 /* FIXME: set status to -ENOMEM */ 189 status = -ENOMEM;
190 break; 190 goto fail_alloc_pipe_resources;
191 }
191 192
192 urb_context->pipe = pipe; 193 urb_context->pipe = pipe;
193 194
@@ -204,6 +205,7 @@ static int ath6kl_usb_alloc_pipe_resources(struct ath6kl_usb_pipe *pipe,
204 pipe->logical_pipe_num, pipe->usb_pipe_handle, 205 pipe->logical_pipe_num, pipe->usb_pipe_handle,
205 pipe->urb_alloc); 206 pipe->urb_alloc);
206 207
208fail_alloc_pipe_resources:
207 return status; 209 return status;
208} 210}
209 211
@@ -803,7 +805,11 @@ static int ath6kl_usb_map_service_pipe(struct ath6kl *ar, u16 svc_id,
803 *dl_pipe = ATH6KL_USB_PIPE_RX_DATA; 805 *dl_pipe = ATH6KL_USB_PIPE_RX_DATA;
804 break; 806 break;
805 case WMI_DATA_VI_SVC: 807 case WMI_DATA_VI_SVC:
806 *ul_pipe = ATH6KL_USB_PIPE_TX_DATA_MP; 808
809 if (ar->hw.flags & ATH6KL_HW_MAP_LP_ENDPOINT)
810 *ul_pipe = ATH6KL_USB_PIPE_TX_DATA_LP;
811 else
812 *ul_pipe = ATH6KL_USB_PIPE_TX_DATA_MP;
807 /* 813 /*
808 * Disable rxdata2 directly, it will be enabled 814 * Disable rxdata2 directly, it will be enabled
809 * if FW enable rxdata2 815 * if FW enable rxdata2
@@ -811,7 +817,11 @@ static int ath6kl_usb_map_service_pipe(struct ath6kl *ar, u16 svc_id,
811 *dl_pipe = ATH6KL_USB_PIPE_RX_DATA; 817 *dl_pipe = ATH6KL_USB_PIPE_RX_DATA;
812 break; 818 break;
813 case WMI_DATA_VO_SVC: 819 case WMI_DATA_VO_SVC:
814 *ul_pipe = ATH6KL_USB_PIPE_TX_DATA_HP; 820
821 if (ar->hw.flags & ATH6KL_HW_MAP_LP_ENDPOINT)
822 *ul_pipe = ATH6KL_USB_PIPE_TX_DATA_LP;
823 else
824 *ul_pipe = ATH6KL_USB_PIPE_TX_DATA_MP;
815 /* 825 /*
816 * Disable rxdata2 directly, it will be enabled 826 * Disable rxdata2 directly, it will be enabled
817 * if FW enable rxdata2 827 * if FW enable rxdata2
@@ -1196,7 +1206,14 @@ static struct usb_driver ath6kl_usb_driver = {
1196 1206
1197static int ath6kl_usb_init(void) 1207static int ath6kl_usb_init(void)
1198{ 1208{
1199 usb_register(&ath6kl_usb_driver); 1209 int ret;
1210
1211 ret = usb_register(&ath6kl_usb_driver);
1212 if (ret) {
1213 ath6kl_err("usb registration failed: %d\n", ret);
1214 return ret;
1215 }
1216
1200 return 0; 1217 return 0;
1201} 1218}
1202 1219
@@ -1220,3 +1237,6 @@ MODULE_FIRMWARE(AR6004_HW_1_1_DEFAULT_BOARD_DATA_FILE);
1220MODULE_FIRMWARE(AR6004_HW_1_2_FIRMWARE_FILE); 1237MODULE_FIRMWARE(AR6004_HW_1_2_FIRMWARE_FILE);
1221MODULE_FIRMWARE(AR6004_HW_1_2_BOARD_DATA_FILE); 1238MODULE_FIRMWARE(AR6004_HW_1_2_BOARD_DATA_FILE);
1222MODULE_FIRMWARE(AR6004_HW_1_2_DEFAULT_BOARD_DATA_FILE); 1239MODULE_FIRMWARE(AR6004_HW_1_2_DEFAULT_BOARD_DATA_FILE);
1240MODULE_FIRMWARE(AR6004_HW_1_3_FW_DIR "/" AR6004_HW_1_3_FIRMWARE_FILE);
1241MODULE_FIRMWARE(AR6004_HW_1_3_BOARD_DATA_FILE);
1242MODULE_FIRMWARE(AR6004_HW_1_3_DEFAULT_BOARD_DATA_FILE);