ath10k: FW API update for version .629
PATCH v2 1/3 ath10k: FW API update for version .629
From: Sujith Manoharan <[email protected]>
--- drivers/net/wireless/ath/ath10k/hw.h | 2 +- drivers/net/wireless/ath/ath10k/wmi.c | 18 ------------- drivers/net/wireless/ath/ath10k/wmi.h | 49 ++++++++++++++++++++++++++++++----- 3 files changed, 44 insertions(+), 25 deletions(-)
drivers/net/wireless/ath/ath10k/hw.h +1 -1
@@ -24,7 +24,7 @@#define SUPPORTED_FW_MAJOR 1#define SUPPORTED_FW_MINOR 0#define SUPPORTED_FW_RELEASE 0 -#define SUPPORTED_FW_BUILD 614 +#define SUPPORTED_FW_BUILD 629/* QCA988X 1.0 definitions */ #define QCA988X_HW_1_0_VERSION 0x4000002c
drivers/net/wireless/ath/ath10k/wmi.c +0 -18
@@ -415,18 +415,6 @@ static void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar,complete (&ar->vdev_setup_done); } -static void ath10k_wmi_event_vdev_standby_req (struct ath10k *ar, -struct sk_buff *skb) -{ -ath10k_dbg (ATH10K_DBG_WMI ,"WMI_VDEV_STANDBY_REQ_EVENTID\n" ); -} - -static void ath10k_wmi_event_vdev_resume_req (struct ath10k *ar, -struct sk_buff *skb) -{ -ath10k_dbg (ATH10K_DBG_WMI ,"WMI_VDEV_RESUME_REQ_EVENTID\n" ); -} -static void ath10k_wmi_event_vdev_stopped (struct ath10k *ar,struct sk_buff *skb) {
@@ -971,12 +959,6 @@ static void ath10k_wmi_event_process(struct ath10k *ar, struct sk_buff *skb)case WMI_VDEV_START_RESP_EVENTID :ath10k_wmi_event_vdev_start_resp (ar, skb);break ; -case WMI_VDEV_STANDBY_REQ_EVENTID : -ath10k_wmi_event_vdev_standby_req (ar, skb); -break ; -case WMI_VDEV_RESUME_REQ_EVENTID : -ath10k_wmi_event_vdev_resume_req (ar, skb); -break ;case WMI_VDEV_STOPPED_EVENTID :ath10k_wmi_event_vdev_stopped (ar, skb);break ;
drivers/net/wireless/ath/ath10k/wmi.h +43 -6
128 lines not on this page · raw message
Signature · 1 line
1.8.2.2
PATCH v2 2/3 ath10k: Strip the QoS header only for QoS data frames
From: Sujith Manoharan <[email protected]>
Also, use ieee80211_hdrlen() to simplify things. This can be done now since the firmware has been fixed (version .625 and above) to operate in NWIFI mode for TX encapsulation.
--- drivers/net/wireless/ath/ath10k/mac.c | 50 +++++++---------------------------- 1 file changed, 9 insertions(+), 41 deletions(-)
drivers/net/wireless/ath/ath10k/mac.c +9 -41
@@ -1176,56 +1176,24 @@ static void ath10k_reg_notifier(struct wiphy *wiphy,/* TX handlers */ /***************/ +/* +* Frames sent to the FW have to be in "Native Wifi" format. +* Strip the QoS field from the 802.11 header. +*/ static void ath10k_tx_h_qos_workaround (struct ieee80211_hw *hw,struct ieee80211_tx_control *control,struct sk_buff *skb) {struct ieee80211_hdr *hdr = (void *)skb->data; -struct ieee80211_tx_info *info =IEEE80211_SKB_CB (skb); -struct ath10k_vif *arvif;u8 *qos_ctl; -/* This is FW issue. It injects QoS Control to frames when WMM is -* active (as far as FW is concerned). We either strip out _our_ QoS -* Control so FW can append it on its own or we upgrade a Data frame to -* a QoS Data frame */ - -if (!ieee80211_is_data (hdr->frame_control)) -return ; - -if (!info->control.vif) +if (!ieee80211_is_data_qos (hdr->frame_control))return ; - arvif =ath10k_vif_to_arvif (info->control.vif); - -switch (arvif->vdev_type) { -case WMI_VDEV_TYPE_STA : -case WMI_VDEV_TYPE_IBSS : -if (!info->control.vif->bss_conf.qos) -return ; -break ; -case WMI_VDEV_TYPE_AP : -if (!control->sta) -return ; - -if (!control->sta->wme) -return ; -break ; -default : -return ; - } - -if (!ieee80211_is_data_qos (hdr->frame_control)) { - hdr->frame_control =__cpu_to_le16 ( -__le16_to_cpu (hdr->frame_control) | -IEEE80211_STYPE_QOS_DATA ); - }else { - qos_ctl =ieee80211_get_qos_ctl (hdr); -memmove (qos_ctl, qos_ctl +IEEE80211_QOS_CTL_LEN , - skb->len - - (qos_ctl +IEEE80211_QOS_CTL_LEN - skb->data)); -skb_trim (skb, skb->len -IEEE80211_QOS_CTL_LEN ); - } + qos_ctl =ieee80211_get_qos_ctl (hdr); +memmove (qos_ctl, qos_ctl +IEEE80211_QOS_CTL_LEN , + skb->len -ieee80211_hdrlen (hdr->frame_control)); +skb_trim (skb, skb->len -IEEE80211_QOS_CTL_LEN ); }static void ath10k_tx_h_update_wep_key (struct sk_buff *skb)
Signature · 1 line
1.8.2.2
PATCH v2 3/3 ath10k: Set the default TX encapsulation type
In reply to Sujith ManoharanFrom: Sujith Manoharan <[email protected]>
The firmware needs to know which frame type is to be used for TX encapsulation. Specifiy this explicitly as NWIFI mode and allow the HW to perform encapsulation.
--- drivers/net/wireless/ath/ath10k/mac.c | 6 ++++++ drivers/net/wireless/ath/ath10k/wmi.h | 8 ++++++++ 2 files changed, 14 insertions(+)
drivers/net/wireless/ath/ath10k/mac.c +6 -0
@@ -1674,6 +1674,12 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,if (ret)ath10k_warn ("Failed to set default keyid: %d\n" , ret); + ret =ath10k_wmi_vdev_set_param (ar, arvif->vdev_id, +WMI_VDEV_PARAM_TX_ENCAP_TYPE , +ATH10K_HW_TXRX_NATIVE_WIFI ); +if (ret) +ath10k_warn ("Failed to set TX encap: %d\n" , ret); +if (arvif->vdev_type ==WMI_VDEV_TYPE_AP ) { ret =ath10k_peer_create (ar, arvif->vdev_id, vif->addr);if (ret) {
drivers/net/wireless/ath/ath10k/wmi.h +8 -0
@@ -104,6 +104,7 @@ enum wmi_service_id {WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM ,/* Modulated DTIM support */ WMI_STA_UAPSD_BASIC_AUTO_TRIG ,/* UAPSD AC Trigger Generation Method */ WMI_STA_UAPSD_VAR_AUTO_TRIG ,/* -do- */ +WMI_SERVICE_TX_ENCAP ,/* Packet type for TX encapsulation */ WMI_SERVICE_LAST ,WMI_MAX_SERVICE =64 /* max service */
@@ -162,6 +163,8 @@ static inline char *wmi_service_name(int service_id)return "FORCE FW HANG" ;case WMI_SERVICE_GPIO :return "GPIO" ; +case WMI_SERVICE_TX_ENCAP : +return "TX ENCAP" ;default :return "UNKNOWN SERVICE\n" ; }
@@ -2185,6 +2188,11 @@ enum wmi_vdev_param {* otherwise forwards to host. */ WMI_VDEV_PARAM_DROP_UNENCRY , + +/* +* Set the encapsulation type for frames. +*/ + WMI_VDEV_PARAM_TX_ENCAP_TYPE, };/* slot time long */
Signature · 1 line
1.8.2.2
PATCH v2 1/3 ath10k: FW API update for version .629
In reply to Sujith ManoharanQuoted 3 lines · Sujith Manoharan
From: Sujith Manoharan <[email protected]>
Signed-off-by Sujith Manoharan <[email protected]>
Thanks, all three applied. The first patch had two long line warnings from comments in wmi.h, I fixed those myself. But please check that the patches are ok.
Signature · 1 line
Kalle Valo