Commit aae7e72e authored by Mateusz Kulikowski's avatar Mateusz Kulikowski Committed by Greg Kroah-Hartman

staging: rtl8192e: Rename set_swcam

Use naming schema found in other rtlwifi devices.
Rename set_swcam to rtl92e_set_swcam.
Signed-off-by: default avatarMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 408bd7b7
......@@ -68,8 +68,9 @@ void rtl92e_enable_hw_security_config(struct net_device *dev)
write_nic_byte(dev, SECR, SECR_value);
}
void set_swcam(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u16 KeyType,
const u8 *MacAddr, u8 DefaultKey, u32 *KeyContent, u8 is_mesh)
void rtl92e_set_swcam(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
u16 KeyType, const u8 *MacAddr, u8 DefaultKey,
u32 *KeyContent, u8 is_mesh)
{
struct r8192_priv *priv = rtllib_priv(dev);
struct rtllib_device *ieee = priv->rtllib;
......
......@@ -33,8 +33,9 @@ void rtl92e_enable_hw_security_config(struct net_device *dev);
void rtl92e_set_key(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
u16 KeyType, const u8 *MacAddr, u8 DefaultKey,
u32 *KeyContent);
void set_swcam(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u16 KeyType,
const u8 *MacAddr, u8 DefaultKey, u32 *KeyContent, u8 is_mesh);
void rtl92e_set_swcam(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
u16 KeyType, const u8 *MacAddr, u8 DefaultKey,
u32 *KeyContent, u8 is_mesh);
void rtl92e_cam_restore(struct net_device *dev);
#endif
......@@ -2376,7 +2376,8 @@ static int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
ieee->iw_mode = IW_MODE_ADHOC;
memcpy((u8 *)key, ipw->u.crypt.key, 16);
rtl92e_enable_hw_security_config(dev);
set_swcam(dev, 4, ipw->u.crypt.idx,
rtl92e_set_swcam(dev, 4,
ipw->u.crypt.idx,
ieee->pairwise_key_type,
(u8 *)ieee->ap_mac_addr,
0, key, 0);
......@@ -2385,7 +2386,8 @@ static int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
(u8 *)ieee->ap_mac_addr,
0, key);
if (ieee->iw_mode == IW_MODE_ADHOC) {
set_swcam(dev, ipw->u.crypt.idx,
rtl92e_set_swcam(dev,
ipw->u.crypt.idx,
ipw->u.crypt.idx,
ieee->pairwise_key_type,
(u8 *)ieee->ap_mac_addr,
......@@ -2420,10 +2422,11 @@ static int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
ieee->group_key_type = KEY_TYPE_NA;
if (ieee->group_key_type) {
set_swcam(dev, ipw->u.crypt.idx,
rtl92e_set_swcam(dev, ipw->u.crypt.idx,
ipw->u.crypt.idx,
ieee->group_key_type,
broadcast_addr, 0, key, 0);
broadcast_addr, 0, key,
0);
rtl92e_set_key(dev, ipw->u.crypt.idx,
ipw->u.crypt.idx,
ieee->group_key_type,
......
......@@ -758,7 +758,7 @@ static int r8192_wx_set_enc(struct net_device *dev,
rtl92e_enable_hw_security_config(dev);
rtl92e_set_key(dev, key_idx, key_idx, KEY_TYPE_WEP104,
zero_addr[key_idx], 0, hwkey);
set_swcam(dev, key_idx, key_idx, KEY_TYPE_WEP104,
rtl92e_set_swcam(dev, key_idx, key_idx, KEY_TYPE_WEP104,
zero_addr[key_idx], 0, hwkey, 0);
} else {
netdev_info(dev,
......@@ -951,12 +951,12 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
if (ext->key_len == 13)
ieee->pairwise_key_type = alg = KEY_TYPE_WEP104;
rtl92e_set_key(dev, idx, idx, alg, zero, 0, key);
set_swcam(dev, idx, idx, alg, zero, 0, key, 0);
rtl92e_set_swcam(dev, idx, idx, alg, zero, 0, key, 0);
} else if (group) {
ieee->group_key_type = alg;
rtl92e_set_key(dev, idx, idx, alg, broadcast_addr, 0,
key);
set_swcam(dev, idx, idx, alg, broadcast_addr, 0,
rtl92e_set_swcam(dev, idx, idx, alg, broadcast_addr, 0,
key, 0);
} else {
if ((ieee->pairwise_key_type == KEY_TYPE_CCMP) &&
......@@ -964,8 +964,8 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
write_nic_byte(dev, 0x173, 1);
rtl92e_set_key(dev, 4, idx, alg,
(u8 *)ieee->ap_mac_addr, 0, key);
set_swcam(dev, 4, idx, alg, (u8 *)ieee->ap_mac_addr,
0, key, 0);
rtl92e_set_swcam(dev, 4, idx, alg,
(u8 *)ieee->ap_mac_addr, 0, key, 0);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment