aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/wext.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-08-02 10:45:55 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:49:38 -0400
commit1443b6530d8db779082dc9fabbd894e2b551b101 (patch)
tree076a7d53d86b829ac1087df4a2f23b252c6648f3 /drivers/net/wireless/libertas/wext.c
parent0c9ca690e0117e1bf415d5f3e392e27c0c472c68 (diff)
[PATCH] libertas: rename WLAN_802_11_KEY to enc_key and clean up usage
It doesn't touch hardware and therefore doesn't need endian notations either. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/wext.c')
-rw-r--r--drivers/net/wireless/libertas/wext.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c
index 2fcc3bf21081..f7df8c71a544 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -1325,7 +1325,7 @@ static int wlan_set_wep_key(struct assoc_request *assoc_req,
1325 int set_tx_key) 1325 int set_tx_key)
1326{ 1326{
1327 int ret = 0; 1327 int ret = 0;
1328 struct WLAN_802_11_KEY *pkey; 1328 struct enc_key *pkey;
1329 1329
1330 lbs_deb_enter(LBS_DEB_WEXT); 1330 lbs_deb_enter(LBS_DEB_WEXT);
1331 1331
@@ -1344,7 +1344,7 @@ static int wlan_set_wep_key(struct assoc_request *assoc_req,
1344 pkey = &assoc_req->wep_keys[index]; 1344 pkey = &assoc_req->wep_keys[index];
1345 1345
1346 if (key_length > 0) { 1346 if (key_length > 0) {
1347 memset(pkey, 0, sizeof(struct WLAN_802_11_KEY)); 1347 memset(pkey, 0, sizeof(struct enc_key));
1348 pkey->type = KEY_TYPE_ID_WEP; 1348 pkey->type = KEY_TYPE_ID_WEP;
1349 1349
1350 /* Standardize the key length */ 1350 /* Standardize the key length */
@@ -1412,11 +1412,11 @@ static void disable_wpa(struct assoc_request *assoc_req)
1412{ 1412{
1413 lbs_deb_enter(LBS_DEB_WEXT); 1413 lbs_deb_enter(LBS_DEB_WEXT);
1414 1414
1415 memset(&assoc_req->wpa_mcast_key, 0, sizeof (struct WLAN_802_11_KEY)); 1415 memset(&assoc_req->wpa_mcast_key, 0, sizeof (struct enc_key));
1416 assoc_req->wpa_mcast_key.flags = KEY_INFO_WPA_MCAST; 1416 assoc_req->wpa_mcast_key.flags = KEY_INFO_WPA_MCAST;
1417 set_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags); 1417 set_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags);
1418 1418
1419 memset(&assoc_req->wpa_unicast_key, 0, sizeof (struct WLAN_802_11_KEY)); 1419 memset(&assoc_req->wpa_unicast_key, 0, sizeof (struct enc_key));
1420 assoc_req->wpa_unicast_key.flags = KEY_INFO_WPA_UNICAST; 1420 assoc_req->wpa_unicast_key.flags = KEY_INFO_WPA_UNICAST;
1421 set_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags); 1421 set_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags);
1422 1422
@@ -1567,7 +1567,7 @@ static int wlan_get_encodeext(struct net_device *dev,
1567 && (adapter->secinfo.WPAenabled || 1567 && (adapter->secinfo.WPAenabled ||
1568 adapter->secinfo.WPA2enabled)) { 1568 adapter->secinfo.WPA2enabled)) {
1569 /* WPA */ 1569 /* WPA */
1570 struct WLAN_802_11_KEY * pkey = NULL; 1570 struct enc_key * pkey = NULL;
1571 1571
1572 if ( adapter->wpa_mcast_key.len 1572 if ( adapter->wpa_mcast_key.len
1573 && (adapter->wpa_mcast_key.flags & KEY_INFO_WPA_ENABLED)) 1573 && (adapter->wpa_mcast_key.flags & KEY_INFO_WPA_ENABLED))
@@ -1679,7 +1679,7 @@ static int wlan_set_encodeext(struct net_device *dev,
1679 if (set_tx_key) 1679 if (set_tx_key)
1680 set_bit(ASSOC_FLAG_WEP_TX_KEYIDX, &assoc_req->flags); 1680 set_bit(ASSOC_FLAG_WEP_TX_KEYIDX, &assoc_req->flags);
1681 } else if ((alg == IW_ENCODE_ALG_TKIP) || (alg == IW_ENCODE_ALG_CCMP)) { 1681 } else if ((alg == IW_ENCODE_ALG_TKIP) || (alg == IW_ENCODE_ALG_CCMP)) {
1682 struct WLAN_802_11_KEY * pkey; 1682 struct enc_key * pkey;
1683 1683
1684 /* validate key length */ 1684 /* validate key length */
1685 if (((alg == IW_ENCODE_ALG_TKIP) 1685 if (((alg == IW_ENCODE_ALG_TKIP)
@@ -1702,7 +1702,7 @@ static int wlan_set_encodeext(struct net_device *dev,
1702 set_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags); 1702 set_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags);
1703 } 1703 }
1704 1704
1705 memset(pkey, 0, sizeof (struct WLAN_802_11_KEY)); 1705 memset(pkey, 0, sizeof (struct enc_key));
1706 memcpy(pkey->key, ext->key, ext->key_len); 1706 memcpy(pkey->key, ext->key, ext->key_len);
1707 pkey->len = ext->key_len; 1707 pkey->len = ext->key_len;
1708 if (pkey->len) 1708 if (pkey->len)