diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2014-05-25 21:36:29 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-25 15:13:59 -0700 |
commit | 83bf96fe5167c3ce8434bc0056c8b2d548d72732 (patch) | |
tree | ebbbf2e5e38f48fc8aca3bed5a198ad166afbc7f /drivers/staging/vt6656/mac.h | |
parent | 5cb5bff703008c2a2dc2357ac660bcbf02796161 (diff) |
staging: vt6656: MACvSetKeyEntry create structure to write key
Create structure for wKeyCtl , pbyAddr and pbyKey
wKeyCtl(key_ctl) and pbyAddr(addr) form an union of 64 bits with swap
of two 32 bits. pbyKey(key) has a length of WLAN_KEY_LEN_CCMP(16)
bytes.
swap is needed because high order 32 bits needs to written out first.
pbyKey is memcpy on to key.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/mac.h')
-rw-r--r-- | drivers/staging/vt6656/mac.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h index 2084d4b1e532..81006853dbda 100644 --- a/drivers/staging/vt6656/mac.h +++ b/drivers/staging/vt6656/mac.h @@ -403,6 +403,17 @@ #define MAC_REVISION_A0 0x00 #define MAC_REVISION_A1 0x01 +struct vnt_mac_set_key { + union { + struct { + u8 addr[ETH_ALEN]; + __le16 key_ctl; + } write __packed; + u32 swap[2]; + } u; + u8 key[WLAN_KEY_LEN_CCMP]; +} __packed; + void MACvWriteMultiAddr(struct vnt_private *, u64); void MACbShutdown(struct vnt_private *); void MACvSetBBType(struct vnt_private *, u8); |