Add test command for disabling/enabling A-MPDU aggregation
ctrl_iface command "SET ampdu <0/1>" can now be used to disable/enable A-MPDU aggregation.
This commit is contained in:
parent
10b9ac17cf
commit
b6c79a998f
4 changed files with 20 additions and 1 deletions
|
@ -1885,6 +1885,14 @@ struct wpa_driver_ops {
|
||||||
*/
|
*/
|
||||||
int (*set_p2p_powersave)(void *priv, int legacy_ps, int opp_ps,
|
int (*set_p2p_powersave)(void *priv, int legacy_ps, int opp_ps,
|
||||||
int ctwindow);
|
int ctwindow);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ampdu - Enable/disable aggregation
|
||||||
|
* @priv: Private driver interface data
|
||||||
|
* @ampdu: 1/0 = enable/disable A-MPDU aggregation
|
||||||
|
* Returns: 0 on success or -1 on failure
|
||||||
|
*/
|
||||||
|
int (*ampdu)(void *priv, int ampdu);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3307,5 +3307,6 @@ const struct wpa_driver_ops wpa_driver_ndis_ops = {
|
||||||
NULL /* shared_freq */,
|
NULL /* shared_freq */,
|
||||||
NULL /* get_noa */,
|
NULL /* get_noa */,
|
||||||
NULL /* set_noa */,
|
NULL /* set_noa */,
|
||||||
NULL /* set_p2p_powersave */
|
NULL /* set_p2p_powersave */,
|
||||||
|
NULL /* ampdu */
|
||||||
};
|
};
|
||||||
|
|
|
@ -84,6 +84,9 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s,
|
||||||
ret = -1;
|
ret = -1;
|
||||||
} else if (os_strcasecmp(cmd, "wps_fragment_size") == 0) {
|
} else if (os_strcasecmp(cmd, "wps_fragment_size") == 0) {
|
||||||
wpa_s->wps_fragment_size = atoi(value);
|
wpa_s->wps_fragment_size = atoi(value);
|
||||||
|
} else if (os_strcasecmp(cmd, "ampdu") == 0) {
|
||||||
|
if (wpa_drv_ampdu(wpa_s, atoi(value)) < 0)
|
||||||
|
ret = -1;
|
||||||
} else {
|
} else {
|
||||||
value[-1] = '=';
|
value[-1] = '=';
|
||||||
ret = wpa_config_process_global(wpa_s->conf, cmd, -1);
|
ret = wpa_config_process_global(wpa_s->conf, cmd, -1);
|
||||||
|
|
|
@ -524,4 +524,11 @@ static inline int wpa_drv_set_p2p_powersave(struct wpa_supplicant *wpa_s,
|
||||||
opp_ps, ctwindow);
|
opp_ps, ctwindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int wpa_drv_ampdu(struct wpa_supplicant *wpa_s, int ampdu)
|
||||||
|
{
|
||||||
|
if (!wpa_s->driver->ampdu)
|
||||||
|
return -1;
|
||||||
|
return wpa_s->driver->ampdu(wpa_s->drv_priv, ampdu);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* DRIVER_I_H */
|
#endif /* DRIVER_I_H */
|
||||||
|
|
Loading…
Reference in a new issue