diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-09-27 06:42:07 -0400 |
---|---|---|
committer | Luciano Coelho <luciano.coelho@nokia.com> | 2010-09-28 05:30:07 -0400 |
commit | 7a55724e0dc24cadaeb58f8306222a7802a24ff1 (patch) | |
tree | 941c2e705808b56980e167856b32b6d5d3fe58d1 | |
parent | 8eab7b4708b5ef4701ecbe5d659f99743b77b668 (diff) |
wl1271: Add support for hardware GEM cipher
This patch adds support for the hardware GEM cipher suite.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_cmd.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 16 |
3 files changed, 19 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h index cae489300e06..779b130fdb3e 100644 --- a/drivers/net/wireless/wl12xx/wl1271.h +++ b/drivers/net/wireless/wl12xx/wl1271.h | |||
@@ -117,6 +117,8 @@ enum { | |||
117 | #define WL1271_TX_SECURITY_LO16(s) ((u16)((s) & 0xffff)) | 117 | #define WL1271_TX_SECURITY_LO16(s) ((u16)((s) & 0xffff)) |
118 | #define WL1271_TX_SECURITY_HI32(s) ((u32)(((s) >> 16) & 0xffffffff)) | 118 | #define WL1271_TX_SECURITY_HI32(s) ((u32)(((s) >> 16) & 0xffffffff)) |
119 | 119 | ||
120 | #define WL1271_CIPHER_SUITE_GEM 0x00147201 | ||
121 | |||
120 | #define WL1271_BUSY_WORD_CNT 1 | 122 | #define WL1271_BUSY_WORD_CNT 1 |
121 | #define WL1271_BUSY_WORD_LEN (WL1271_BUSY_WORD_CNT * sizeof(u32)) | 123 | #define WL1271_BUSY_WORD_LEN (WL1271_BUSY_WORD_CNT * sizeof(u32)) |
122 | 124 | ||
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.h b/drivers/net/wireless/wl12xx/wl1271_cmd.h index ff8e35e87d98..33b946b4cb07 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.h +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.h | |||
@@ -279,7 +279,7 @@ enum wl1271_cmd_key_type { | |||
279 | KEY_WEP = 1, | 279 | KEY_WEP = 1, |
280 | KEY_TKIP = 2, | 280 | KEY_TKIP = 2, |
281 | KEY_AES = 3, | 281 | KEY_AES = 3, |
282 | KEY_GEM = 4 | 282 | KEY_GEM = 4, |
283 | }; | 283 | }; |
284 | 284 | ||
285 | /* FIXME: Add description for key-types */ | 285 | /* FIXME: Add description for key-types */ |
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index b7e9c69f3772..cb18f22bbc5c 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -1549,6 +1549,11 @@ static int wl1271_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
1549 | tx_seq_32 = WL1271_TX_SECURITY_HI32(wl->tx_security_seq); | 1549 | tx_seq_32 = WL1271_TX_SECURITY_HI32(wl->tx_security_seq); |
1550 | tx_seq_16 = WL1271_TX_SECURITY_LO16(wl->tx_security_seq); | 1550 | tx_seq_16 = WL1271_TX_SECURITY_LO16(wl->tx_security_seq); |
1551 | break; | 1551 | break; |
1552 | case WL1271_CIPHER_SUITE_GEM: | ||
1553 | key_type = KEY_GEM; | ||
1554 | tx_seq_32 = WL1271_TX_SECURITY_HI32(wl->tx_security_seq); | ||
1555 | tx_seq_16 = WL1271_TX_SECURITY_LO16(wl->tx_security_seq); | ||
1556 | break; | ||
1552 | default: | 1557 | default: |
1553 | wl1271_error("Unknown key algo 0x%x", key_conf->cipher); | 1558 | wl1271_error("Unknown key algo 0x%x", key_conf->cipher); |
1554 | 1559 | ||
@@ -2403,6 +2408,14 @@ EXPORT_SYMBOL_GPL(wl1271_unregister_hw); | |||
2403 | 2408 | ||
2404 | int wl1271_init_ieee80211(struct wl1271 *wl) | 2409 | int wl1271_init_ieee80211(struct wl1271 *wl) |
2405 | { | 2410 | { |
2411 | static const u32 cipher_suites[] = { | ||
2412 | WLAN_CIPHER_SUITE_WEP40, | ||
2413 | WLAN_CIPHER_SUITE_WEP104, | ||
2414 | WLAN_CIPHER_SUITE_TKIP, | ||
2415 | WLAN_CIPHER_SUITE_CCMP, | ||
2416 | WL1271_CIPHER_SUITE_GEM, | ||
2417 | }; | ||
2418 | |||
2406 | /* The tx descriptor buffer and the TKIP space. */ | 2419 | /* The tx descriptor buffer and the TKIP space. */ |
2407 | wl->hw->extra_tx_headroom = WL1271_TKIP_IV_SPACE + | 2420 | wl->hw->extra_tx_headroom = WL1271_TKIP_IV_SPACE + |
2408 | sizeof(struct wl1271_tx_hw_descr); | 2421 | sizeof(struct wl1271_tx_hw_descr); |
@@ -2420,6 +2433,9 @@ int wl1271_init_ieee80211(struct wl1271 *wl) | |||
2420 | IEEE80211_HW_CONNECTION_MONITOR | | 2433 | IEEE80211_HW_CONNECTION_MONITOR | |
2421 | IEEE80211_HW_SUPPORTS_CQM_RSSI; | 2434 | IEEE80211_HW_SUPPORTS_CQM_RSSI; |
2422 | 2435 | ||
2436 | wl->hw->wiphy->cipher_suites = cipher_suites; | ||
2437 | wl->hw->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); | ||
2438 | |||
2423 | wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | | 2439 | wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | |
2424 | BIT(NL80211_IFTYPE_ADHOC); | 2440 | BIT(NL80211_IFTYPE_ADHOC); |
2425 | wl->hw->wiphy->max_scan_ssids = 1; | 2441 | wl->hw->wiphy->max_scan_ssids = 1; |