Skip to content

Commit

Permalink
ath10k-ct: Add ability to disable mu-beamform capability flags.
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Greear <greearb@candelatech.com>
  • Loading branch information
greearb committed Feb 14, 2018
1 parent 4c164c0 commit 0010c5a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ath10k-4.13/core.c
Expand Up @@ -1203,6 +1203,12 @@ static int ath10k_fetch_fwcfg_file(struct ath10k *ar)
ar->fwcfg.flags |= ATH10K_FWCFG_NOHWCRYPT;
}
}
else if (strcasecmp(filename, "nobeamform_mu") == 0) {
if (kstrtol(val, 0, &t) == 0) {
ar->fwcfg.nobeamform_mu = t;
ar->fwcfg.flags |= ATH10K_FWCFG_NOBEAMFORM_MU;
}
}
else if (strcasecmp(filename, "rate_ctrl_objs") == 0) {
if (kstrtol(val, 0, &t) == 0) {
ar->fwcfg.rate_ctrl_objs = t;
Expand Down Expand Up @@ -2375,6 +2381,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar)
}

ar->request_nohwcrypt = ath10k_modparam_nohwcrypt;
ar->request_nobeamform_mu = ath10k_modparam_nobeamform_mu;
ar->num_ratectrl_objs = ath10k_modparam_target_num_rate_ctrl_objs_ct;
ar->eeprom_regdom = _modparam_override_eeprom_regdomain;

Expand All @@ -2387,6 +2394,8 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar)
ar->max_num_stations = ar->fwcfg.stations;
if (ar->fwcfg.flags & ATH10K_FWCFG_NOHWCRYPT)
ar->request_nohwcrypt = ar->fwcfg.nohwcrypt;
if (ar->fwcfg.flags & ATH10K_FWCFG_NOBEAMFORM_MU)
ar->request_nobeamform_mu = ar->fwcfg.nobeamform_mu;
if (ar->fwcfg.flags & ATH10K_FWCFG_RATE_CTRL_OBJS)
ar->num_ratectrl_objs = ar->fwcfg.rate_ctrl_objs;
if (ar->fwcfg.flags & ATH10K_FWCFG_TX_DESC)
Expand Down
3 changes: 3 additions & 0 deletions ath10k-4.13/core.h
Expand Up @@ -1005,6 +1005,7 @@ struct ath10k {
#define ATH10K_FWCFG_REGDOM (1<<11)
#define ATH10K_FWCFG_BMISS_VDEVS (1<<12)
#define ATH10K_FWCFG_MAX_AMSDUS (1<<13)
#define ATH10K_FWCFG_NOBEAMFORM_MU (1<<14)

u32 flags; /* let us know which fields have been set */
char calname[100];
Expand All @@ -1015,6 +1016,7 @@ struct ath10k {
u32 stations;
u32 peers;
u32 nohwcrypt;
u32 nobeamform_mu;
u32 rate_ctrl_objs;
u32 tx_desc; /* max_num_pending_tx descriptors */
u32 max_nss; /* max_spatial_stream */
Expand Down Expand Up @@ -1123,6 +1125,7 @@ struct ath10k {
int num_active_peers;
int num_tids;
bool request_nohwcrypt; /* desired setting */
bool request_nobeamform_mu;
u32 num_ratectrl_objs;
u32 skid_limit;
u32 bmiss_offload_max_vdev;
Expand Down
5 changes: 5 additions & 0 deletions ath10k-4.13/mac.c
Expand Up @@ -214,6 +214,11 @@ int ath10k_mac_ext_resource_config(struct ath10k *ar, u32 val)
int ath10k_modparam_nohwcrypt;
module_param_named(nohwcrypt, ath10k_modparam_nohwcrypt, int, 0444);
MODULE_PARM_DESC(nohwcrypt, "Disable hardware rx decrypt feature");

int ath10k_modparam_nobeamform_mu;
module_param_named(nobeamform_mu, ath10k_modparam_nobeamform_mu, int, 0444);
MODULE_PARM_DESC(nobeamform_mu, "Disable TX/RX MU Beamforming capabilities");

int ath10k_modparam_target_num_vdevs_ct = DEF_TARGET_10X_NUM_VDEVS_CT;
module_param_named(num_vdevs_ct, ath10k_modparam_target_num_vdevs_ct, int, 0444);
MODULE_PARM_DESC(num_vdevs_ct, "Maximum vdevs to request from firmware");
Expand Down
1 change: 1 addition & 0 deletions ath10k-4.13/mac.h
Expand Up @@ -27,6 +27,7 @@ enum wmi_tlv_tx_pause_id;
enum wmi_tlv_tx_pause_action;

extern int ath10k_modparam_nohwcrypt;
extern int ath10k_modparam_nobeamform_mu;
extern int ath10k_modparam_target_num_vdevs_ct;
extern int ath10k_modparam_target_num_peers_ct;
extern int ath10k_modparam_target_num_msdu_desc_ct;
Expand Down
3 changes: 3 additions & 0 deletions ath10k-4.13/wmi.c
Expand Up @@ -4981,6 +4981,9 @@ static void ath10k_wmi_event_service_ready_work(struct work_struct *work)
ar->request_nohwcrypt)
ar->vht_cap_info &= ~IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE;

if (ar->request_nobeamform_mu)
ar->vht_cap_info &= ~(IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE);

if (ar->num_rf_chains > ar->max_spatial_stream) {
ath10k_warn(ar, "hardware advertises support for more spatial streams than it should (%d > %d)\n",
ar->num_rf_chains, ar->max_spatial_stream);
Expand Down

0 comments on commit 0010c5a

Please sign in to comment.