wpa_supplicant: Allow disabling LDPC
Allows user to disable LDPC coding. This possibility is useful for testing purpose. Signed-off-by: Pawel Kulakowski <pawel.kulakowski@tieto.com>
This commit is contained in:
parent
72300408d4
commit
39a5800f7c
4 changed files with 37 additions and 0 deletions
|
@ -1701,6 +1701,7 @@ static const struct parse_data ssid_fields[] = {
|
||||||
{ INT_RANGE(disable_ht, 0, 1) },
|
{ INT_RANGE(disable_ht, 0, 1) },
|
||||||
{ INT_RANGE(disable_ht40, -1, 1) },
|
{ INT_RANGE(disable_ht40, -1, 1) },
|
||||||
{ INT_RANGE(disable_sgi, 0, 1) },
|
{ INT_RANGE(disable_sgi, 0, 1) },
|
||||||
|
{ INT_RANGE(disable_ldpc, 0, 1) },
|
||||||
{ INT_RANGE(disable_max_amsdu, -1, 1) },
|
{ INT_RANGE(disable_max_amsdu, -1, 1) },
|
||||||
{ INT_RANGE(ampdu_factor, -1, 3) },
|
{ INT_RANGE(ampdu_factor, -1, 3) },
|
||||||
{ INT_RANGE(ampdu_density, -1, 7) },
|
{ INT_RANGE(ampdu_density, -1, 7) },
|
||||||
|
@ -2157,6 +2158,7 @@ void wpa_config_set_network_defaults(struct wpa_ssid *ssid)
|
||||||
ssid->disable_ht = DEFAULT_DISABLE_HT;
|
ssid->disable_ht = DEFAULT_DISABLE_HT;
|
||||||
ssid->disable_ht40 = DEFAULT_DISABLE_HT40;
|
ssid->disable_ht40 = DEFAULT_DISABLE_HT40;
|
||||||
ssid->disable_sgi = DEFAULT_DISABLE_SGI;
|
ssid->disable_sgi = DEFAULT_DISABLE_SGI;
|
||||||
|
ssid->disable_ldpc = DEFAULT_DISABLE_LDPC;
|
||||||
ssid->disable_max_amsdu = DEFAULT_DISABLE_MAX_AMSDU;
|
ssid->disable_max_amsdu = DEFAULT_DISABLE_MAX_AMSDU;
|
||||||
ssid->ampdu_factor = DEFAULT_AMPDU_FACTOR;
|
ssid->ampdu_factor = DEFAULT_AMPDU_FACTOR;
|
||||||
ssid->ampdu_density = DEFAULT_AMPDU_DENSITY;
|
ssid->ampdu_density = DEFAULT_AMPDU_DENSITY;
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#define DEFAULT_DISABLE_HT 0
|
#define DEFAULT_DISABLE_HT 0
|
||||||
#define DEFAULT_DISABLE_HT40 0
|
#define DEFAULT_DISABLE_HT40 0
|
||||||
#define DEFAULT_DISABLE_SGI 0
|
#define DEFAULT_DISABLE_SGI 0
|
||||||
|
#define DEFAULT_DISABLE_LDPC 0
|
||||||
#define DEFAULT_DISABLE_MAX_AMSDU -1 /* no change */
|
#define DEFAULT_DISABLE_MAX_AMSDU -1 /* no change */
|
||||||
#define DEFAULT_AMPDU_FACTOR -1 /* no change */
|
#define DEFAULT_AMPDU_FACTOR -1 /* no change */
|
||||||
#define DEFAULT_AMPDU_DENSITY -1 /* no change */
|
#define DEFAULT_AMPDU_DENSITY -1 /* no change */
|
||||||
|
@ -524,6 +525,14 @@ struct wpa_ssid {
|
||||||
*/
|
*/
|
||||||
int disable_sgi;
|
int disable_sgi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* disable_ldpc - Disable LDPC for this network
|
||||||
|
*
|
||||||
|
* By default, use it if it is available, but this can be configured
|
||||||
|
* to 1 to have it disabled.
|
||||||
|
*/
|
||||||
|
int disable_ldpc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* disable_max_amsdu - Disable MAX A-MSDU
|
* disable_max_amsdu - Disable MAX A-MSDU
|
||||||
*
|
*
|
||||||
|
|
|
@ -2922,6 +2922,27 @@ static int wpa_set_disable_sgi(struct wpa_supplicant *wpa_s,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int wpa_set_disable_ldpc(struct wpa_supplicant *wpa_s,
|
||||||
|
struct ieee80211_ht_capabilities *htcaps,
|
||||||
|
struct ieee80211_ht_capabilities *htcaps_mask,
|
||||||
|
int disabled)
|
||||||
|
{
|
||||||
|
/* Masking these out disables LDPC */
|
||||||
|
u16 msk = host_to_le16(HT_CAP_INFO_LDPC_CODING_CAP);
|
||||||
|
|
||||||
|
wpa_msg(wpa_s, MSG_DEBUG, "set_disable_ldpc: %d", disabled);
|
||||||
|
|
||||||
|
if (disabled)
|
||||||
|
htcaps->ht_capabilities_info &= ~msk;
|
||||||
|
else
|
||||||
|
htcaps->ht_capabilities_info |= msk;
|
||||||
|
|
||||||
|
htcaps_mask->ht_capabilities_info |= msk;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void wpa_supplicant_apply_ht_overrides(
|
void wpa_supplicant_apply_ht_overrides(
|
||||||
struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
|
struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
|
||||||
struct wpa_driver_associate_params *params)
|
struct wpa_driver_associate_params *params)
|
||||||
|
@ -2945,6 +2966,7 @@ void wpa_supplicant_apply_ht_overrides(
|
||||||
wpa_set_ampdu_density(wpa_s, htcaps, htcaps_mask, ssid->ampdu_density);
|
wpa_set_ampdu_density(wpa_s, htcaps, htcaps_mask, ssid->ampdu_density);
|
||||||
wpa_set_disable_ht40(wpa_s, htcaps, htcaps_mask, ssid->disable_ht40);
|
wpa_set_disable_ht40(wpa_s, htcaps, htcaps_mask, ssid->disable_ht40);
|
||||||
wpa_set_disable_sgi(wpa_s, htcaps, htcaps_mask, ssid->disable_sgi);
|
wpa_set_disable_sgi(wpa_s, htcaps, htcaps_mask, ssid->disable_sgi);
|
||||||
|
wpa_set_disable_ldpc(wpa_s, htcaps, htcaps_mask, ssid->disable_ldpc);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_HT_OVERRIDES */
|
#endif /* CONFIG_HT_OVERRIDES */
|
||||||
|
|
|
@ -947,6 +947,10 @@ fast_reauth=1
|
||||||
# 0 = SGI enabled (if AP supports it)
|
# 0 = SGI enabled (if AP supports it)
|
||||||
# 1 = SGI disabled
|
# 1 = SGI disabled
|
||||||
#
|
#
|
||||||
|
# disable_ldpc: Whether LDPC should be disabled.
|
||||||
|
# 0 = LDPC enabled (if AP supports it)
|
||||||
|
# 1 = LDPC disabled
|
||||||
|
#
|
||||||
# ht_mcs: Configure allowed MCS rates.
|
# ht_mcs: Configure allowed MCS rates.
|
||||||
# Parsed as an array of bytes, in base-16 (ascii-hex)
|
# Parsed as an array of bytes, in base-16 (ascii-hex)
|
||||||
# ht_mcs="" // Use all available (default)
|
# ht_mcs="" // Use all available (default)
|
||||||
|
|
Loading…
Reference in a new issue