Commit 8df0f1e5 authored by Wei Yongjun's avatar Wei Yongjun Committed by John W. Linville

ipw2200: return error code on error in ipw_wx_get_auth()

We have assinged error code to 'ret' when get auth from some
option is not supported but never used it, but we'd better return
the error code.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9304a1c7
...@@ -6812,7 +6812,6 @@ static int ipw_wx_get_auth(struct net_device *dev, ...@@ -6812,7 +6812,6 @@ static int ipw_wx_get_auth(struct net_device *dev,
struct libipw_device *ieee = priv->ieee; struct libipw_device *ieee = priv->ieee;
struct lib80211_crypt_data *crypt; struct lib80211_crypt_data *crypt;
struct iw_param *param = &wrqu->param; struct iw_param *param = &wrqu->param;
int ret = 0;
switch (param->flags & IW_AUTH_INDEX) { switch (param->flags & IW_AUTH_INDEX) {
case IW_AUTH_WPA_VERSION: case IW_AUTH_WPA_VERSION:
...@@ -6822,8 +6821,7 @@ static int ipw_wx_get_auth(struct net_device *dev, ...@@ -6822,8 +6821,7 @@ static int ipw_wx_get_auth(struct net_device *dev,
/* /*
* wpa_supplicant will control these internally * wpa_supplicant will control these internally
*/ */
ret = -EOPNOTSUPP; return -EOPNOTSUPP;
break;
case IW_AUTH_TKIP_COUNTERMEASURES: case IW_AUTH_TKIP_COUNTERMEASURES:
crypt = priv->ieee->crypt_info.crypt[priv->ieee->crypt_info.tx_keyidx]; crypt = priv->ieee->crypt_info.crypt[priv->ieee->crypt_info.tx_keyidx];
......
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