Commit f5f05715 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: OnAction23a(): Use struct ieee80211_mgmt instead of hardcoded offsets

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0e959699
...@@ -2245,16 +2245,12 @@ static int ...@@ -2245,16 +2245,12 @@ static int
OnAction23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) OnAction23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
{ {
int i; int i;
unsigned char category; u8 category;
struct action_handler *ptable; struct action_handler *ptable;
unsigned char *frame_body;
struct sk_buff *skb = precv_frame->pkt; struct sk_buff *skb = precv_frame->pkt;
u8 *pframe = skb->data; struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) skb->data;
frame_body = (unsigned char *)
(pframe + sizeof(struct ieee80211_hdr_3addr));
category = frame_body[0]; category = mgmt->u.action.category;
for (i = 0; for (i = 0;
i < sizeof(OnAction23a_tbl) / sizeof(struct action_handler); i++) { i < sizeof(OnAction23a_tbl) / sizeof(struct action_handler); i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment