diff options
author | Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> | 2012-11-16 07:53:15 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-11-27 14:44:28 -0500 |
commit | eb922e4b41fd315f4ef95fef0ca1051b61cd5538 (patch) | |
tree | 673f91ceb66f418b876671cae8b783bec0afda3a /drivers/net/wireless/ath/ath6kl | |
parent | 8aa659d2c9ad2df8873c5ba1d7f030d6acf39c4c (diff) |
ath6kl: Parse beacon interval from userspace
Parse beacon interval from userspace to
firmware. Incase the firmware does not
supports it, just print a warning message
and continue with AP settings.
Cc: Sumathi Mandipati <sumathi@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.h | 6 |
3 files changed, 28 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index cea885617d61..f253d6684d8f 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -2770,9 +2770,11 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev, | |||
2770 | 2770 | ||
2771 | ar->ap_mode_bkey.valid = false; | 2771 | ar->ap_mode_bkey.valid = false; |
2772 | 2772 | ||
2773 | /* TODO: | 2773 | ret = ath6kl_wmi_ap_set_beacon_intvl_cmd(ar->wmi, vif->fw_vif_idx, |
2774 | * info->interval | 2774 | info->beacon_interval); |
2775 | */ | 2775 | |
2776 | if (ret) | ||
2777 | ath6kl_warn("Failed to set beacon interval: %d\n", ret); | ||
2776 | 2778 | ||
2777 | ret = ath6kl_wmi_ap_set_dtim_cmd(ar->wmi, vif->fw_vif_idx, | 2779 | ret = ath6kl_wmi_ap_set_dtim_cmd(ar->wmi, vif->fw_vif_idx, |
2778 | info->dtim_period); | 2780 | info->dtim_period); |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index f4ef6a724e4c..a0503c2e7a7e 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c | |||
@@ -752,6 +752,23 @@ int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid) | |||
752 | NO_SYNC_WMIFLAG); | 752 | NO_SYNC_WMIFLAG); |
753 | } | 753 | } |
754 | 754 | ||
755 | int ath6kl_wmi_ap_set_beacon_intvl_cmd(struct wmi *wmi, u8 if_idx, | ||
756 | u32 beacon_intvl) | ||
757 | { | ||
758 | struct sk_buff *skb; | ||
759 | struct set_beacon_int_cmd *cmd; | ||
760 | |||
761 | skb = ath6kl_wmi_get_new_buf(sizeof(*cmd)); | ||
762 | if (!skb) | ||
763 | return -ENOMEM; | ||
764 | |||
765 | cmd = (struct set_beacon_int_cmd *) skb->data; | ||
766 | |||
767 | cmd->beacon_intvl = cpu_to_le32(beacon_intvl); | ||
768 | return ath6kl_wmi_cmd_send(wmi, if_idx, skb, | ||
769 | WMI_SET_BEACON_INT_CMDID, NO_SYNC_WMIFLAG); | ||
770 | } | ||
771 | |||
755 | int ath6kl_wmi_ap_set_dtim_cmd(struct wmi *wmi, u8 if_idx, u32 dtim_period) | 772 | int ath6kl_wmi_ap_set_dtim_cmd(struct wmi *wmi, u8 if_idx, u32 dtim_period) |
756 | { | 773 | { |
757 | struct sk_buff *skb; | 774 | struct sk_buff *skb; |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h index 98b1755e67f4..b5f226503baf 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.h +++ b/drivers/net/wireless/ath/ath6kl/wmi.h | |||
@@ -1660,6 +1660,10 @@ struct roam_ctrl_cmd { | |||
1660 | u8 roam_ctrl; | 1660 | u8 roam_ctrl; |
1661 | } __packed; | 1661 | } __packed; |
1662 | 1662 | ||
1663 | struct set_beacon_int_cmd { | ||
1664 | __le32 beacon_intvl; | ||
1665 | } __packed; | ||
1666 | |||
1663 | struct set_dtim_cmd { | 1667 | struct set_dtim_cmd { |
1664 | __le32 dtim_period; | 1668 | __le32 dtim_period; |
1665 | } __packed; | 1669 | } __packed; |
@@ -2649,6 +2653,8 @@ int ath6kl_wmi_del_wow_pattern_cmd(struct wmi *wmi, u8 if_idx, | |||
2649 | int ath6kl_wmi_set_rssi_filter_cmd(struct wmi *wmi, u8 if_idx, s8 rssi); | 2653 | int ath6kl_wmi_set_rssi_filter_cmd(struct wmi *wmi, u8 if_idx, s8 rssi); |
2650 | int ath6kl_wmi_set_roam_lrssi_cmd(struct wmi *wmi, u8 lrssi); | 2654 | int ath6kl_wmi_set_roam_lrssi_cmd(struct wmi *wmi, u8 lrssi); |
2651 | int ath6kl_wmi_ap_set_dtim_cmd(struct wmi *wmi, u8 if_idx, u32 dtim_period); | 2655 | int ath6kl_wmi_ap_set_dtim_cmd(struct wmi *wmi, u8 if_idx, u32 dtim_period); |
2656 | int ath6kl_wmi_ap_set_beacon_intvl_cmd(struct wmi *wmi, u8 if_idx, | ||
2657 | u32 beacon_interval); | ||
2652 | int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid); | 2658 | int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid); |
2653 | int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode); | 2659 | int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode); |
2654 | int ath6kl_wmi_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, bool mc_all_on); | 2660 | int ath6kl_wmi_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, bool mc_all_on); |