rtl92e_cam_restore() is unused. Remove dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@xxxxxxxxx> --- drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 63 --------------------- drivers/staging/rtl8192e/rtl8192e/rtl_cam.h | 1 - 2 files changed, 64 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c index 14b48cacfbbd..9b280cee0ac1 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c @@ -121,66 +121,3 @@ void rtl92e_set_key(struct net_device *dev, u8 EntryNo, u8 KeyIndex, } } } - -void rtl92e_cam_restore(struct net_device *dev) -{ - u8 EntryId = 0; - struct r8192_priv *priv = rtllib_priv(dev); - u8 *MacAddr = priv->rtllib->current_network.bssid; - - static u8 CAM_CONST_ADDR[4][6] = { - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x01}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x02}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x03} - }; - static u8 CAM_CONST_BROAD[] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff - }; - - if ((priv->rtllib->pairwise_key_type == KEY_TYPE_WEP40) || - (priv->rtllib->pairwise_key_type == KEY_TYPE_WEP104)) { - for (EntryId = 0; EntryId < 4; EntryId++) { - MacAddr = CAM_CONST_ADDR[EntryId]; - if (priv->rtllib->swcamtable[EntryId].bused) { - rtl92e_set_key(dev, EntryId, EntryId, - priv->rtllib->pairwise_key_type, - MacAddr, 0, - (u32 *)(&priv->rtllib->swcamtable - [EntryId].key_buf[0])); - } - } - - } else if (priv->rtllib->pairwise_key_type == KEY_TYPE_TKIP) { - rtl92e_set_key(dev, 4, 0, - priv->rtllib->pairwise_key_type, - MacAddr, 0, - (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0])); - } else if (priv->rtllib->pairwise_key_type == KEY_TYPE_CCMP) { - rtl92e_set_key(dev, 4, 0, - priv->rtllib->pairwise_key_type, MacAddr, - 0, (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0])); - } - - if (priv->rtllib->group_key_type == KEY_TYPE_TKIP) { - MacAddr = CAM_CONST_BROAD; - for (EntryId = 1; EntryId < 4; EntryId++) { - if (priv->rtllib->swcamtable[EntryId].bused) { - rtl92e_set_key(dev, EntryId, EntryId, - priv->rtllib->group_key_type, - MacAddr, 0, - (u32 *)(&priv->rtllib->swcamtable[EntryId].key_buf[0])); - } - } - } else if (priv->rtllib->group_key_type == KEY_TYPE_CCMP) { - MacAddr = CAM_CONST_BROAD; - for (EntryId = 1; EntryId < 4; EntryId++) { - if (priv->rtllib->swcamtable[EntryId].bused) { - rtl92e_set_key(dev, EntryId, EntryId, - priv->rtllib->group_key_type, - MacAddr, 0, - (u32 *)(&priv->rtllib->swcamtable[EntryId].key_buf[0])); - } - } - } -} diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h index bd33ef105107..615b84bca9b8 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h @@ -20,6 +20,5 @@ void rtl92e_set_key(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u32 *KeyContent); void rtl92e_set_swcam(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u16 KeyType, const u8 *MacAddr, u32 *KeyContent); -void rtl92e_cam_restore(struct net_device *dev); #endif -- 2.42.0