staging: rtl8723au: Stop setting ieee_parm arguments that aren't used
authorJes Sorensen <Jes.Sorensen@redhat.com>
Tue, 24 Jun 2014 13:03:48 +0000 (15:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jun 2014 17:51:01 +0000 (13:51 -0400)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c

index 624966eada1fe6ad420c395fcda263899c117832..7aaa3f8bda9dea29a120092124b64f21180e7b40 100644 (file)
@@ -514,17 +514,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, u8 key_index,
 
        DBG_8723A("%s\n", __func__);
 
-       param->u.crypt.err = 0;
-       param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0';
-
-       /* sizeof(struct ieee_param) = 64 bytes; */
-       /* if (param_len !=  (u32) ((u8 *) param->u.crypt.key -
-          (u8 *) param) + param->u.crypt.key_len) */
-       if (param_len != sizeof(struct ieee_param) + param->u.crypt.key_len) {
-               ret = -EINVAL;
-               goto exit;
-       }
-
        if (is_broadcast_ether_addr(param->sta_addr)) {
                if (key_index >= WEP_KEYS) {
                        ret = -EINVAL;
@@ -616,7 +605,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, u8 key_index,
                                       keyparms->key,
                                       (key_len > 16 ? 16 : key_len));
 
-                               /* DEBUG_ERR("set key length :param->u.crypt.key_len =%d\n", param->u.crypt.key_len); */
                                /* set mic key */
                                memcpy(psecuritypriv->
                                       dot118021XGrptxmickey[key_index].skey,
@@ -692,7 +680,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, u8 key_index,
                                psta->dot118021XPrivacy =
                                        WLAN_CIPHER_SUITE_TKIP;
 
-                               /* DEBUG_ERR("set key length :param->u.crypt.key_len =%d\n", param->u.crypt.key_len); */
                                /* set mic key */
                                memcpy(psta->dot11tkiptxmickey.skey,
                                       &keyparms->key[16], 8);
@@ -738,9 +725,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, u8 key_index,
                                       keyparms->key,
                                       (key_len > 16 ? 16 : key_len));
 
-                               /* DEBUG_ERR("set key length :param->u"
-                                  ".crypt.key_len =%d\n",
-                                  param->u.crypt.key_len); */
                                /* set mic key */
                                memcpy(psecuritypriv->
                                       dot118021XGrptxmickey[key_index].skey,
@@ -804,17 +788,8 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, u8 key_index,
 
        DBG_8723A("%s\n", __func__);
 
-       param->u.crypt.err = 0;
-       param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0';
-
        key_len = keyparms->key_len;
 
-       if (param_len <
-           (u32) ((u8 *) param->u.crypt.key - (u8 *) param) + key_len) {
-               ret = -EINVAL;
-               goto exit;
-       }
-
        if (is_broadcast_ether_addr(param->sta_addr)) {
                if (key_index >= WEP_KEYS) {
                        ret = -EINVAL;
@@ -1029,18 +1004,6 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
        else
                set_tx = 1;     /* for wpa/wpa2 pairwise key */
 
-       /* param->u.crypt.idx = key_index - 1; */
-       param->u.crypt.idx = key_index;
-
-       if (params->seq_len && params->seq) {
-               memcpy(param->u.crypt.seq, params->seq, params->seq_len);
-       }
-
-       if (params->key_len && params->key) {
-               param->u.crypt.key_len = params->key_len;
-               memcpy(param->u.crypt.key, params->key, params->key_len);
-       }
-
        if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
                ret = rtw_cfg80211_set_encryption(ndev, key_index, set_tx,
                                                  param, param_len, params);