提交 2ab658f9 编写于 作者: D David Kilroy 提交者: John W. Linville

cfg80211: set WE encoding size based on available ciphers

Only set the sizes for WEP40 and WEP104.
Signed-off-by: NDavid Kilroy <kilroyd@googlemail.com>
Acked-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 51cd4aab
......@@ -173,9 +173,6 @@ int cfg80211_wext_giwrange(struct net_device *dev,
range->min_frag = 256;
range->max_frag = 2346;
range->encoding_size[0] = 5;
range->encoding_size[1] = 13;
range->num_encoding_sizes = 2;
range->max_encoding_tokens = 4;
range->max_qual.updated = IW_QUAL_NOISE_INVALID;
......@@ -215,6 +212,16 @@ int cfg80211_wext_giwrange(struct net_device *dev,
case WLAN_CIPHER_SUITE_CCMP:
range->enc_capa |= IW_ENC_CAPA_CIPHER_CCMP;
break;
case WLAN_CIPHER_SUITE_WEP40:
range->encoding_size[range->num_encoding_sizes++] =
WLAN_KEY_LEN_WEP40;
break;
case WLAN_CIPHER_SUITE_WEP104:
range->encoding_size[range->num_encoding_sizes++] =
WLAN_KEY_LEN_WEP104;
break;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册