mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 07:26:48 +07:00
Staging: rtl8192su/ieee80211: remove unused ieee80211_wx_get_encode_ext()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
7d74deed7c
commit
86467e7bc1
@ -2220,9 +2220,6 @@ extern int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
|
||||
extern int ieee80211_wx_get_encode(struct ieee80211_device *ieee,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *key);
|
||||
extern int ieee80211_wx_get_encode_ext(struct ieee80211_device *ieee,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data* wrqu, char *extra);
|
||||
extern int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data* wrqu, char *extra);
|
||||
|
@ -675,61 +675,6 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ieee80211_wx_get_encode_ext(struct ieee80211_device *ieee,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
{
|
||||
struct iw_point *encoding = &wrqu->encoding;
|
||||
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
|
||||
struct ieee80211_crypt_data *crypt;
|
||||
int idx, max_key_len;
|
||||
|
||||
max_key_len = encoding->length - sizeof(*ext);
|
||||
if (max_key_len < 0)
|
||||
return -EINVAL;
|
||||
|
||||
idx = encoding->flags & IW_ENCODE_INDEX;
|
||||
if (idx) {
|
||||
if (idx < 1 || idx > WEP_KEYS)
|
||||
return -EINVAL;
|
||||
idx--;
|
||||
} else
|
||||
idx = ieee->tx_keyidx;
|
||||
|
||||
if (!(ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) &&
|
||||
ext->alg != IW_ENCODE_ALG_WEP)
|
||||
if (idx != 0 || ieee->iw_mode != IW_MODE_INFRA)
|
||||
return -EINVAL;
|
||||
|
||||
crypt = ieee->crypt[idx];
|
||||
encoding->flags = idx + 1;
|
||||
memset(ext, 0, sizeof(*ext));
|
||||
|
||||
if (crypt == NULL || crypt->ops == NULL ) {
|
||||
ext->alg = IW_ENCODE_ALG_NONE;
|
||||
ext->key_len = 0;
|
||||
encoding->flags |= IW_ENCODE_DISABLED;
|
||||
} else {
|
||||
if (strcmp(crypt->ops->name, "WEP") == 0 )
|
||||
ext->alg = IW_ENCODE_ALG_WEP;
|
||||
else if (strcmp(crypt->ops->name, "TKIP"))
|
||||
ext->alg = IW_ENCODE_ALG_TKIP;
|
||||
else if (strcmp(crypt->ops->name, "CCMP"))
|
||||
ext->alg = IW_ENCODE_ALG_CCMP;
|
||||
else
|
||||
return -EINVAL;
|
||||
ext->key_len = crypt->ops->get_key(ext->key, SCM_KEY_LEN, NULL, crypt->priv);
|
||||
encoding->flags |= IW_ENCODE_ENABLED;
|
||||
if (ext->key_len &&
|
||||
(ext->alg == IW_ENCODE_ALG_TKIP ||
|
||||
ext->alg == IW_ENCODE_ALG_CCMP))
|
||||
ext->ext_flags |= IW_ENCODE_EXT_TX_SEQ_VALID;
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
|
Loading…
Reference in New Issue
Block a user