aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest
diff options
context:
space:
mode:
Diffstat (limited to 'wlantest')
-rw-r--r--wlantest/gcmp.c6
-rw-r--r--wlantest/test_vectors.c4
-rw-r--r--wlantest/wlantest.h6
3 files changed, 8 insertions, 8 deletions
diff --git a/wlantest/gcmp.c b/wlantest/gcmp.c
index 161b8a7..d92f4ed 100644
--- a/wlantest/gcmp.c
+++ b/wlantest/gcmp.c
@@ -112,9 +112,9 @@ u8 * gcmp_decrypt(const u8 *tk, size_t tk_len, const struct ieee80211_hdr *hdr,
}
-u8 * gcmp_encrypt(const u8 *tk, size_t tk_len, u8 *frame, size_t len,
- size_t hdrlen, u8 *qos,
- u8 *pn, int keyid, size_t *encrypted_len)
+u8 * gcmp_encrypt(const u8 *tk, size_t tk_len, const u8 *frame, size_t len,
+ size_t hdrlen, const u8 *qos,
+ const u8 *pn, int keyid, size_t *encrypted_len)
{
u8 aad[30], nonce[12], *crypt, *pos;
size_t aad_len, plen;
diff --git a/wlantest/test_vectors.c b/wlantest/test_vectors.c
index 321d930..36f2f5d 100644
--- a/wlantest/test_vectors.c
+++ b/wlantest/test_vectors.c
@@ -232,7 +232,7 @@ struct gcmp_test {
u8 encr[300];
};
-static struct gcmp_test gcmp_vectors[] =
+static const struct gcmp_test gcmp_vectors[] =
{
{
.tk = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
@@ -348,7 +348,7 @@ static struct gcmp_test gcmp_vectors[] =
};
-static int run_gcmp(int idx, struct gcmp_test *vector)
+static int run_gcmp(int idx, const struct gcmp_test *vector)
{
u8 *enc, *plain;
size_t enc_len, plain_len;
diff --git a/wlantest/wlantest.h b/wlantest/wlantest.h
index 1d8088f..29bcab5 100644
--- a/wlantest/wlantest.h
+++ b/wlantest/wlantest.h
@@ -291,9 +291,9 @@ u8 * bip_gmac_protect(const u8 *igtk, size_t igtk_len, u8 *frame, size_t len,
u8 * gcmp_decrypt(const u8 *tk, size_t tk_len, const struct ieee80211_hdr *hdr,
const u8 *data, size_t data_len, size_t *decrypted_len);
-u8 * gcmp_encrypt(const u8 *tk, size_t tk_len, u8 *frame, size_t len,
- size_t hdrlen, u8 *qos,
- u8 *pn, int keyid, size_t *encrypted_len);
+u8 * gcmp_encrypt(const u8 *tk, size_t tk_len, const u8 *frame, size_t len,
+ size_t hdrlen, const u8 *qos,
+ const u8 *pn, int keyid, size_t *encrypted_len);
int ctrl_init(struct wlantest *wt);
void ctrl_deinit(struct wlantest *wt);