aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEtay Luz <eluz@qca.qualcomm.com>2012-05-30 04:35:08 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2012-06-11 09:08:13 -0400
commitd154f32ebe3ffe9dea6ed0a91767883b1e7a6bc0 (patch)
treee5c80381990ae8195acb8f0847480c5aa0e9a45e
parentf1ff32e8a8672d4d59283fb7f61f1431c2b9e434 (diff)
ath6kl: support changing dtim period on AP mode
This patch adds support for dtim_period configuration in beacon. kvalo: add a comment about ignoring the error, use vif_idx, add \n to the warning message Signed-off-by: Etay Luz <eluz@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c8
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.c16
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.h5
3 files changed, 28 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index d2129030fd7..f00d377343d 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -2783,9 +2783,15 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
2783 2783
2784 /* TODO: 2784 /* TODO:
2785 * info->interval 2785 * info->interval
2786 * info->dtim_period
2787 */ 2786 */
2788 2787
2788 ret = ath6kl_wmi_ap_set_dtim_cmd(ar->wmi, vif->fw_vif_idx,
2789 info->dtim_period);
2790
2791 /* ignore error, just print a warning and continue normally */
2792 if (ret)
2793 ath6kl_warn("Failed to set dtim_period in beacon: %d\n", ret);
2794
2789 if (info->beacon.head == NULL) 2795 if (info->beacon.head == NULL)
2790 return -EINVAL; 2796 return -EINVAL;
2791 mgmt = (struct ieee80211_mgmt *) info->beacon.head; 2797 mgmt = (struct ieee80211_mgmt *) info->beacon.head;
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 43bce9c8a86..a6caa673e8a 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -752,6 +752,22 @@ int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid)
752 NO_SYNC_WMIFLAG); 752 NO_SYNC_WMIFLAG);
753} 753}
754 754
755int ath6kl_wmi_ap_set_dtim_cmd(struct wmi *wmi, u8 if_idx, u32 dtim_period)
756{
757 struct sk_buff *skb;
758 struct set_dtim_cmd *cmd;
759
760 skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
761 if (!skb)
762 return -ENOMEM;
763
764 cmd = (struct set_dtim_cmd *) skb->data;
765
766 cmd->dtim_period = cpu_to_le32(dtim_period);
767 return ath6kl_wmi_cmd_send(wmi, if_idx, skb,
768 WMI_AP_SET_DTIM_CMDID, NO_SYNC_WMIFLAG);
769}
770
755int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode) 771int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode)
756{ 772{
757 struct sk_buff *skb; 773 struct sk_buff *skb;
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index 7c94fe3e9e6..43339aca585 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -1617,6 +1617,10 @@ struct roam_ctrl_cmd {
1617 u8 roam_ctrl; 1617 u8 roam_ctrl;
1618} __packed; 1618} __packed;
1619 1619
1620struct set_dtim_cmd {
1621 __le32 dtim_period;
1622} __packed;
1623
1620/* BSS INFO HDR version 2.0 */ 1624/* BSS INFO HDR version 2.0 */
1621struct wmi_bss_info_hdr2 { 1625struct wmi_bss_info_hdr2 {
1622 __le16 ch; /* frequency in MHz */ 1626 __le16 ch; /* frequency in MHz */
@@ -2589,6 +2593,7 @@ int ath6kl_wmi_add_wow_pattern_cmd(struct wmi *wmi, u8 if_idx,
2589int ath6kl_wmi_del_wow_pattern_cmd(struct wmi *wmi, u8 if_idx, 2593int ath6kl_wmi_del_wow_pattern_cmd(struct wmi *wmi, u8 if_idx,
2590 u16 list_id, u16 filter_id); 2594 u16 list_id, u16 filter_id);
2591int ath6kl_wmi_set_roam_lrssi_cmd(struct wmi *wmi, u8 lrssi); 2595int ath6kl_wmi_set_roam_lrssi_cmd(struct wmi *wmi, u8 lrssi);
2596int ath6kl_wmi_ap_set_dtim_cmd(struct wmi *wmi, u8 if_idx, u32 dtim_period);
2592int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid); 2597int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid);
2593int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode); 2598int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode);
2594int ath6kl_wmi_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, bool mc_all_on); 2599int ath6kl_wmi_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, bool mc_all_on);