From: Sujith Manoharan Date: Thu, 9 May 2013 12:31:57 +0530 Subject: [ath9k-devel] [PATCH v2 3/3] ath10k: Set the default TX encapsulation type In-Reply-To: <1368082917-32296-1-git-send-email-sujith@msujith.org> References: <1368082917-32296-1-git-send-email-sujith@msujith.org> Message-ID: <1368082917-32296-3-git-send-email-sujith@msujith.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org From: Sujith Manoharan 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. Signed-off-by: Sujith Manoharan --- drivers/net/wireless/ath/ath10k/mac.c | 6 ++++++ drivers/net/wireless/ath/ath10k/wmi.h | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 59e9874..182bf67 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -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) { diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 82267e8..d2c5d32 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -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 */ -- 1.8.2.2