o wl3501: revert the change to get_encode wrt priv_opt_implemented

It turns out that the first implementation of get_encode was right
wrt checking WL3501_MIB_ATTR_PRIV_OPT_IMPLEMENTED, according to
the "802.12 Wireless Networks - The Definitive Guide" O'Reilly book,
so, put it back in.
parent 4c003524
...@@ -2182,10 +2182,19 @@ static int wl3501_get_encode(struct net_device *dev, ...@@ -2182,10 +2182,19 @@ static int wl3501_get_encode(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra) union iwreq_data *wrqu, char *extra)
{ {
u8 restricted, keys[100], len_keys, tocopy; u8 implemented, restricted, keys[100], len_keys, tocopy;
struct wl3501_card *this = (struct wl3501_card *)dev->priv; struct wl3501_card *this = (struct wl3501_card *)dev->priv;
int rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_EXCLUDE_UNENCRYPTED, int rc = wl3501_get_mib_value(this,
&restricted, sizeof(restricted)); WL3501_MIB_ATTR_PRIV_OPT_IMPLEMENTED,
&implemented, sizeof(implemented));
if (rc)
goto out;
if (!implemented) {
wrqu->encoding.flags = IW_ENCODE_DISABLED;
goto out;
}
rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_EXCLUDE_UNENCRYPTED,
&restricted, sizeof(restricted));
if (rc) if (rc)
goto out; goto out;
wrqu->encoding.flags = restricted ? IW_ENCODE_RESTRICTED : wrqu->encoding.flags = restricted ? IW_ENCODE_RESTRICTED :
......
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