Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wimax/i6x50: add Intel WiFi/WiMAX Link 6050 Series support

Add support for the WiMAX device in the Intel WiFi/WiMAX Link 6050
Series; this involves:

- adding the device ID to bind to and an endpoint mapping for the
driver to use.

- at probe() time, some things are set depending on the device id:

+ the list of firmware names to try

+ mapping of endpoints

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>

authored by

Dirk Brandewie and committed by
Inaky Perez-Gonzalez
7329012e f8fc3295

+26 -7
+3
drivers/net/wimax/i2400m/fw.c
··· 277 277 result = i2400m_barker_db_add(I2400M_SBOOT_BARKER); 278 278 if (result < 0) 279 279 goto error_add; 280 + result = i2400m_barker_db_add(I2400M_SBOOT_BARKER_6050); 281 + if (result < 0) 282 + goto error_add; 280 283 error_add: 281 284 return result; 282 285 }
+3
drivers/net/wimax/i2400m/i2400m-usb.h
··· 148 148 I2400MU_MAX_NOTIFICATION_LEN = 256, 149 149 I2400MU_BLK_SIZE = 16, 150 150 I2400MU_PL_SIZE_MAX = 0x3EFF, 151 + 152 + /* Device IDs */ 153 + USB_DEVICE_ID_I6050 = 0x0186, 151 154 }; 152 155 153 156
+19 -7
drivers/net/wimax/i2400m/usb.c
··· 80 80 "initial debug value to set."); 81 81 82 82 /* Our firmware file name */ 83 - static const char *i2400mu_bus_fw_names[] = { 83 + static const char *i2400mu_bus_fw_names_5x50[] = { 84 84 #define I2400MU_FW_FILE_NAME_v1_4 "i2400m-fw-usb-1.4.sbcf" 85 85 I2400MU_FW_FILE_NAME_v1_4, 86 - #define I2400MU_FW_FILE_NAME_v1_3 "i2400m-fw-usb-1.3.sbcf" 87 - I2400MU_FW_FILE_NAME_v1_3, 86 + NULL, 87 + }; 88 + 89 + 90 + static const char *i2400mu_bus_fw_names_6050[] = { 91 + #define I6050U_FW_FILE_NAME_v1_5 "i6050-fw-usb-1.5.sbcf" 92 + I6050U_FW_FILE_NAME_v1_5, 88 93 NULL, 89 94 }; 90 95 ··· 423 418 i2400m->bus_bm_retries = I2400M_USB_BOOT_RETRIES; 424 419 i2400m->bus_bm_cmd_send = i2400mu_bus_bm_cmd_send; 425 420 i2400m->bus_bm_wait_for_ack = i2400mu_bus_bm_wait_for_ack; 426 - i2400m->bus_fw_names = i2400mu_bus_fw_names; 427 421 i2400m->bus_bm_mac_addr_impaired = 0; 428 422 429 - { 423 + if (id->idProduct == USB_DEVICE_ID_I6050) { 424 + i2400m->bus_fw_names = i2400mu_bus_fw_names_6050; 425 + i2400mu->endpoint_cfg.bulk_out = 0; 426 + i2400mu->endpoint_cfg.notification = 3; 427 + i2400mu->endpoint_cfg.reset_cold = 2; 428 + i2400mu->endpoint_cfg.bulk_in = 1; 429 + } else { 430 + i2400m->bus_fw_names = i2400mu_bus_fw_names_5x50; 430 431 i2400mu->endpoint_cfg.bulk_out = 0; 431 432 i2400mu->endpoint_cfg.notification = 1; 432 433 i2400mu->endpoint_cfg.reset_cold = 2; ··· 625 614 626 615 static 627 616 struct usb_device_id i2400mu_id_table[] = { 617 + { USB_DEVICE(0x8086, USB_DEVICE_ID_I6050) }, 628 618 { USB_DEVICE(0x8086, 0x0181) }, 629 619 { USB_DEVICE(0x8086, 0x1403) }, 630 620 { USB_DEVICE(0x8086, 0x1405) }, ··· 668 656 module_exit(i2400mu_driver_exit); 669 657 670 658 MODULE_AUTHOR("Intel Corporation <linux-wimax@intel.com>"); 671 - MODULE_DESCRIPTION("Intel 2400M WiMAX networking for USB"); 659 + MODULE_DESCRIPTION("Driver for USB based Intel Wireless WiMAX Connection 2400M " 660 + "(5x50 & 6050)"); 672 661 MODULE_LICENSE("GPL"); 673 662 MODULE_FIRMWARE(I2400MU_FW_FILE_NAME_v1_4); 674 - MODULE_FIRMWARE(I2400MU_FW_FILE_NAME_v1_3);
+1
include/linux/wimax/i2400m.h
··· 266 266 I2400M_WARM_RESET_BARKER = 0x50f750f7, 267 267 I2400M_NBOOT_BARKER = 0xdeadbeef, 268 268 I2400M_SBOOT_BARKER = 0x0ff1c1a1, 269 + I2400M_SBOOT_BARKER_6050 = 0x80000001, 269 270 I2400M_ACK_BARKER = 0xfeedbabe, 270 271 I2400M_D2H_MSG_BARKER = 0xbeefbabe, 271 272 };