diff options
author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2012-04-09 09:33:58 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-04-09 11:25:56 -0400 |
commit | df90b36940019a879d08bc5e8a20daa0c9fe0122 (patch) | |
tree | 0be946d8ad4042097b20295cfc806ae6d10a1c5d /drivers/net/wireless/ath/ath6kl/wmi.c | |
parent | bed56e313ada1d25d16e4101677c8f75eda78c60 (diff) |
ath6kl: Configure htcap in fw based on the channel type in AP mode
This patch disables HT in start_ap if the type of the channel on
which the AP mode is going to be operating is non-HT. HT is enabled
with default ht cap setting if the operating channel is going to be
11n.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/wmi.c')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index b1b1f347a118..efd707e69255 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c | |||
@@ -2882,6 +2882,43 @@ int ath6kl_wmi_set_keepalive_cmd(struct wmi *wmi, u8 if_idx, | |||
2882 | return ret; | 2882 | return ret; |
2883 | } | 2883 | } |
2884 | 2884 | ||
2885 | int ath6kl_wmi_set_htcap_cmd(struct wmi *wmi, u8 if_idx, | ||
2886 | enum ieee80211_band band, | ||
2887 | struct ath6kl_htcap *htcap) | ||
2888 | { | ||
2889 | struct sk_buff *skb; | ||
2890 | struct wmi_set_htcap_cmd *cmd; | ||
2891 | |||
2892 | skb = ath6kl_wmi_get_new_buf(sizeof(*cmd)); | ||
2893 | if (!skb) | ||
2894 | return -ENOMEM; | ||
2895 | |||
2896 | cmd = (struct wmi_set_htcap_cmd *) skb->data; | ||
2897 | |||
2898 | /* | ||
2899 | * NOTE: Band in firmware matches enum ieee80211_band, it is unlikely | ||
2900 | * this will be changed in firmware. If at all there is any change in | ||
2901 | * band value, the host needs to be fixed. | ||
2902 | */ | ||
2903 | cmd->band = band; | ||
2904 | cmd->ht_enable = !!htcap->ht_enable; | ||
2905 | cmd->ht20_sgi = !!(htcap->cap_info & IEEE80211_HT_CAP_SGI_20); | ||
2906 | cmd->ht40_supported = | ||
2907 | !!(htcap->cap_info & IEEE80211_HT_CAP_SUP_WIDTH_20_40); | ||
2908 | cmd->ht40_sgi = !!(htcap->cap_info & IEEE80211_HT_CAP_SGI_40); | ||
2909 | cmd->intolerant_40mhz = | ||
2910 | !!(htcap->cap_info & IEEE80211_HT_CAP_40MHZ_INTOLERANT); | ||
2911 | cmd->max_ampdu_len_exp = htcap->ampdu_factor; | ||
2912 | |||
2913 | ath6kl_dbg(ATH6KL_DBG_WMI, | ||
2914 | "Set htcap: band:%d ht_enable:%d 40mhz:%d sgi_20mhz:%d sgi_40mhz:%d 40mhz_intolerant:%d ampdu_len_exp:%d\n", | ||
2915 | cmd->band, cmd->ht_enable, cmd->ht40_supported, | ||
2916 | cmd->ht20_sgi, cmd->ht40_sgi, cmd->intolerant_40mhz, | ||
2917 | cmd->max_ampdu_len_exp); | ||
2918 | return ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_SET_HT_CAP_CMDID, | ||
2919 | NO_SYNC_WMIFLAG); | ||
2920 | } | ||
2921 | |||
2885 | int ath6kl_wmi_test_cmd(struct wmi *wmi, void *buf, size_t len) | 2922 | int ath6kl_wmi_test_cmd(struct wmi *wmi, void *buf, size_t len) |
2886 | { | 2923 | { |
2887 | struct sk_buff *skb; | 2924 | struct sk_buff *skb; |