From: Philipp Hortmann Date: Mon, 2 Oct 2023 17:53:20 +0000 (+0200) Subject: staging: rtl8192e: Remove unused function rtl92e_cam_restore() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4a0fc1c07dba35cda2acc89a3bc33babec96d312;p=linux.git staging: rtl8192e: Remove unused function rtl92e_cam_restore() rtl92e_cam_restore() is unused. Remove dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/4375f7909fe717555adca1338506fb6d4dad142e.1696266964.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c index 14b48cacfbbd1..9b280cee0ac14 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 bd33ef1051072..615b84bca9b8a 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