[net80211] add placeholders for the VHT action frame handling.

Upcoming vht support will register send/receive action handlers.
This commit is contained in:
Adrian Chadd 2016-12-31 07:50:14 +00:00
parent 34694ebe05
commit 7c87f23e82
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=310891
2 changed files with 27 additions and 1 deletions

View File

@ -382,7 +382,7 @@ struct ieee80211_action {
#define IEEE80211_ACTION_CAT_MESH 13 /* Mesh */
#define IEEE80211_ACTION_CAT_SELF_PROT 15 /* Self-protected */
/* 16 - 125 reserved */
#define IEEE80211_ACTION_VHT 21
#define IEEE80211_ACTION_CAT_VHT 21
#define IEEE80211_ACTION_CAT_VENDOR 127 /* Vendor Specific */
#define IEEE80211_ACTION_HT_TXCHWIDTH 0 /* recommended xmit chan width*/

View File

@ -79,6 +79,10 @@ static ieee80211_send_action_func *vendor_send_action[8] = {
send_inval, send_inval, send_inval, send_inval,
};
static ieee80211_send_action_func *vht_send_action[3] = {
send_inval, send_inval, send_inval,
};
int
ieee80211_send_action_register(int cat, int act, ieee80211_send_action_func *f)
{
@ -108,6 +112,11 @@ ieee80211_send_action_register(int cat, int act, ieee80211_send_action_func *f)
break;
vendor_send_action[act] = f;
return 0;
case IEEE80211_ACTION_CAT_VHT:
if (act >= nitems(vht_send_action))
break;
vht_send_action[act] = f;
return 0;
}
return EINVAL;
}
@ -144,6 +153,10 @@ ieee80211_send_action(struct ieee80211_node *ni, int cat, int act, void *sa)
if (act < nitems(vendor_send_action))
f = vendor_send_action[act];
break;
case IEEE80211_ACTION_CAT_VHT:
if (act < nitems(vht_send_action))
f = vht_send_action[act];
break;
}
return f(ni, cat, act, sa);
}
@ -177,6 +190,10 @@ static ieee80211_recv_action_func *vendor_recv_action[8] = {
recv_inval, recv_inval, recv_inval, recv_inval,
};
static ieee80211_recv_action_func *vht_recv_action[3] = {
recv_inval, recv_inval, recv_inval
};
int
ieee80211_recv_action_register(int cat, int act, ieee80211_recv_action_func *f)
{
@ -206,6 +223,11 @@ ieee80211_recv_action_register(int cat, int act, ieee80211_recv_action_func *f)
break;
vendor_recv_action[act] = f;
return 0;
case IEEE80211_ACTION_CAT_VHT:
if (act >= nitems(vht_recv_action))
break;
vht_recv_action[act] = f;
return 0;
}
return EINVAL;
}
@ -256,6 +278,10 @@ ieee80211_recv_action(struct ieee80211_node *ni,
if (ia->ia_action < nitems(vendor_recv_action))
f = vendor_recv_action[ia->ia_action];
break;
case IEEE80211_ACTION_CAT_VHT:
if (ia->ia_action < nitems(vht_recv_action))
f = vht_recv_action[ia->ia_action];
break;
}
return f(ni, wh, frm, efrm);
}