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:
Jouni Malinen 2010-08-01 16:19:31 -07:00 committed by Jouni Malinen
parent 10b9ac17cf
commit b6c79a998f
4 changed files with 20 additions and 1 deletions

View file

@ -1885,6 +1885,14 @@ struct wpa_driver_ops {
*/
int (*set_p2p_powersave)(void *priv, int legacy_ps, int opp_ps,
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);
};

View file

@ -3307,5 +3307,6 @@ const struct wpa_driver_ops wpa_driver_ndis_ops = {
NULL /* shared_freq */,
NULL /* get_noa */,
NULL /* set_noa */,
NULL /* set_p2p_powersave */
NULL /* set_p2p_powersave */,
NULL /* ampdu */
};

View file

@ -84,6 +84,9 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s,
ret = -1;
} else if (os_strcasecmp(cmd, "wps_fragment_size") == 0) {
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 {
value[-1] = '=';
ret = wpa_config_process_global(wpa_s->conf, cmd, -1);

View file

@ -524,4 +524,11 @@ static inline int wpa_drv_set_p2p_powersave(struct wpa_supplicant *wpa_s,
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 */