staging: r8188eu: remove specific device table
authorMartin Kaiser <martin@kaiser.cx>
Sun, 10 Oct 2021 17:51:55 +0000 (19:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Oct 2021 12:26:50 +0000 (14:26 +0200)
This driver implements a mechanism to set additional configuration flags
per supported usb device.

None of the supported devices uses these additional flags. Remove the data
types and the code to process the flags.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211010175204.24029-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/include/drv_types.h
drivers/staging/r8188eu/os_dep/usb_intf.c

index ce88575a87260a7bd6e0ec8065221a16ecb16590..3e4928320f17f501e036f44efa2fc81350af600c 100644 (file)
 
 #define DRIVERVERSION  "v4.1.4_6773.20130222"
 
-#define SPEC_DEV_ID_NONE               BIT(0)
-#define SPEC_DEV_ID_DISABLE_HT         BIT(1)
-#define SPEC_DEV_ID_ENABLE_PS          BIT(2)
-#define SPEC_DEV_ID_RF_CONFIG_1T1R     BIT(3)
-#define SPEC_DEV_ID_RF_CONFIG_2T2R     BIT(4)
-#define SPEC_DEV_ID_ASSIGN_IFNAME      BIT(5)
-
-struct specific_device_id {
-       u32             flags;
-       u16             idVendor;
-       u16             idProduct;
-};
-
 struct registry_priv {
        u8      chip_version;
        u8      rfintfs;
index 664ffaba589b0d845e9236fa6b597077159dd164..4b8a3e821b748ac346ff92bb9f568283f56313d7 100644 (file)
@@ -49,10 +49,6 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
 
 MODULE_DEVICE_TABLE(usb, rtw_usb_id_tbl);
 
-static struct specific_device_id specific_device_id_tbl[] = {
-       {}              /* empty table for now */
-};
-
 struct rtw_usb_drv {
        struct usb_driver usbdrv;
        int drv_registered;
@@ -212,28 +208,6 @@ static void rtw_dev_unload(struct adapter *padapter)
        DBG_88E("<=== rtw_dev_unload\n");
 }
 
-static void process_spec_devid(const struct usb_device_id *pdid)
-{
-       u16 vid, pid;
-       u32 flags;
-       int i;
-       int num = sizeof(specific_device_id_tbl) /
-                 sizeof(struct specific_device_id);
-
-       for (i = 0; i < num; i++) {
-               vid = specific_device_id_tbl[i].idVendor;
-               pid = specific_device_id_tbl[i].idProduct;
-               flags = specific_device_id_tbl[i].flags;
-
-               if ((pdid->idVendor == vid) && (pdid->idProduct == pid) &&
-                   (flags & SPEC_DEV_ID_DISABLE_HT)) {
-                       rtw_ht_enable = 0;
-                       rtw_cbw40_enable = 0;
-                       rtw_ampdu_enable = 0;
-               }
-       }
-}
-
 static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
 {
        struct dvobj_priv *dvobj = usb_get_intfdata(pusb_intf);
@@ -499,9 +473,6 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device
        struct adapter *if1 = NULL;
        struct dvobj_priv *dvobj;
 
-       /* step 0. */
-       process_spec_devid(pdid);
-
        /* Initialize dvobj_priv */
        dvobj = usb_dvobj_init(pusb_intf);
        if (!dvobj)