path: root/wpa_supplicant/wpas_kay.c
diff options
authorSabrina Dubroca <sd@queasysnail.net>2016-10-21 12:45:26 (GMT)
committerJouni Malinen <j@w1.fi>2016-10-29 08:24:08 (GMT)
commit6f551abdfca16021e7cd9d4ac891e3eb27010a90 (patch)
tree9ea4345035c2f4f9ebed67efba338d6b4a5b2724 /wpa_supplicant/wpas_kay.c
parent7d8f795003a5979f727c543738a91848d9fb6d7f (diff)
mka: Remove "channel" hacks from the stack and the macsec_qca driver
This is specific to the macsec_qca driver. The core implementation shouldn't care about this, and only deal with the complete secure channel, and pass this down to the driver. Drivers that have such limitations should take care of these in their ->create functions and throw an error. Since the core MKA no longer saves the channel number, the macsec_qca driver must be able to recover it. Add a map (which is just an array since it's quite short) to match SCIs to channel numbers, and lookup functions that will be called in every place where functions would get the channel from the core code. Getting an available channel should be part of channel creation, instead of being a preparation step. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Diffstat (limited to 'wpa_supplicant/wpas_kay.c')
1 files changed, 0 insertions, 14 deletions
diff --git a/wpa_supplicant/wpas_kay.c b/wpa_supplicant/wpas_kay.c
index 29b7b56..64364f7 100644
--- a/wpa_supplicant/wpas_kay.c
+++ b/wpa_supplicant/wpas_kay.c
@@ -86,12 +86,6 @@ static int wpas_set_transmit_next_pn(void *wpa_s, struct transmit_sa *sa)
-static int wpas_get_available_receive_sc(void *wpa_s, u32 *channel)
- return wpa_drv_get_available_receive_sc(wpa_s, channel);
static unsigned int conf_offset_val(enum confidentiality_offset co)
switch (co) {
@@ -138,12 +132,6 @@ static int wpas_disable_receive_sa(void *wpa_s, struct receive_sa *sa)
-static int wpas_get_available_transmit_sc(void *wpa_s, u32 *channel)
- return wpa_drv_get_available_transmit_sc(wpa_s, channel);
static int
wpas_create_transmit_sc(void *wpa_s, struct transmit_sc *sc,
enum confidentiality_offset co)
@@ -205,13 +193,11 @@ int ieee802_1x_alloc_kay_sm(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
kay_ctx->get_receive_lowest_pn = wpas_get_receive_lowest_pn;
kay_ctx->get_transmit_next_pn = wpas_get_transmit_next_pn;
kay_ctx->set_transmit_next_pn = wpas_set_transmit_next_pn;
- kay_ctx->get_available_receive_sc = wpas_get_available_receive_sc;
kay_ctx->create_receive_sc = wpas_create_receive_sc;
kay_ctx->delete_receive_sc = wpas_delete_receive_sc;
kay_ctx->create_receive_sa = wpas_create_receive_sa;
kay_ctx->enable_receive_sa = wpas_enable_receive_sa;
kay_ctx->disable_receive_sa = wpas_disable_receive_sa;
- kay_ctx->get_available_transmit_sc = wpas_get_available_transmit_sc;
kay_ctx->create_transmit_sc = wpas_create_transmit_sc;
kay_ctx->delete_transmit_sc = wpas_delete_transmit_sc;
kay_ctx->create_transmit_sa = wpas_create_transmit_sa;