Mark ieee802_11_parse_elems() input and parsed elems const
In addition, re-order IE pointers and u8 length so that the shorter length fields are together to allow compiler to optimize structure size.
This commit is contained in:
parent
f8b1f69561
commit
ba091c06c5
4 changed files with 35 additions and 34 deletions
|
@ -130,11 +130,11 @@ static int ecw2cw(int ecw)
|
|||
|
||||
|
||||
static void ieee80211_sta_wmm_params(struct wpa_supplicant *wpa_s,
|
||||
u8 *wmm_param, size_t wmm_param_len)
|
||||
const u8 *wmm_param, size_t wmm_param_len)
|
||||
{
|
||||
size_t left;
|
||||
int count;
|
||||
u8 *pos;
|
||||
const u8 *pos;
|
||||
u8 wmm_acm;
|
||||
|
||||
if (wmm_param_len < 8 || wmm_param[5] /* version */ != 1)
|
||||
|
@ -218,8 +218,8 @@ static int ieee80211_sta_tx(struct wpa_supplicant *wpa_s, const u8 *buf,
|
|||
|
||||
|
||||
static void ieee80211_send_auth(struct wpa_supplicant *wpa_s,
|
||||
int transaction, u8 *extra, size_t extra_len,
|
||||
int encrypt)
|
||||
int transaction, const u8 *extra,
|
||||
size_t extra_len, int encrypt)
|
||||
{
|
||||
u8 *buf;
|
||||
size_t len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue