aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2014-09-11 06:00:19 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-11-11 00:12:01 -0500
commit6ce73e6569d45755483b44033b985abf29d5a4db (patch)
tree4dbee9513c7daf566ac599fb366c17b87df40000 /drivers/net/wireless/iwlwifi
parent7992074960a8bea6467cab3555b80a404ebd9b82 (diff)
iwlwifi: mvm: expose some static APIs for use by TDLS code
Mostly functions related to building Tx-commands for sending to FW. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mvm.h12
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c4
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/tx.c22
3 files changed, 24 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h
index 256765accbc6..1fc94e1db015 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
@@ -831,6 +831,16 @@ int __must_check iwl_mvm_send_cmd_pdu_status(struct iwl_mvm *mvm, u8 id,
831int iwl_mvm_tx_skb(struct iwl_mvm *mvm, struct sk_buff *skb, 831int iwl_mvm_tx_skb(struct iwl_mvm *mvm, struct sk_buff *skb,
832 struct ieee80211_sta *sta); 832 struct ieee80211_sta *sta);
833int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb); 833int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb);
834void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
835 struct iwl_tx_cmd *tx_cmd,
836 struct ieee80211_tx_info *info, u8 sta_id);
837void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm,
838 struct ieee80211_tx_info *info,
839 struct iwl_tx_cmd *tx_cmd,
840 struct sk_buff *skb_frag);
841void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd,
842 struct ieee80211_tx_info *info,
843 struct ieee80211_sta *sta, __le16 fc);
834#ifdef CONFIG_IWLWIFI_DEBUG 844#ifdef CONFIG_IWLWIFI_DEBUG
835const char *iwl_mvm_get_tx_fail_reason(u32 status); 845const char *iwl_mvm_get_tx_fail_reason(u32 status);
836#else 846#else
@@ -900,6 +910,8 @@ void iwl_mvm_phy_ctxt_ref(struct iwl_mvm *mvm,
900void iwl_mvm_phy_ctxt_unref(struct iwl_mvm *mvm, 910void iwl_mvm_phy_ctxt_unref(struct iwl_mvm *mvm,
901 struct iwl_mvm_phy_ctxt *ctxt); 911 struct iwl_mvm_phy_ctxt *ctxt);
902int iwl_mvm_phy_ctx_count(struct iwl_mvm *mvm); 912int iwl_mvm_phy_ctx_count(struct iwl_mvm *mvm);
913u8 iwl_mvm_get_channel_width(struct cfg80211_chan_def *chandef);
914u8 iwl_mvm_get_ctrl_pos(struct cfg80211_chan_def *chandef);
903 915
904/* MAC (virtual interface) programming */ 916/* MAC (virtual interface) programming */
905int iwl_mvm_mac_ctxt_init(struct iwl_mvm *mvm, struct ieee80211_vif *vif); 917int iwl_mvm_mac_ctxt_init(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
diff --git a/drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c
index 12283b55ee84..1c0d4a45c1a8 100644
--- a/drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c
@@ -68,7 +68,7 @@
68#include "mvm.h" 68#include "mvm.h"
69 69
70/* Maps the driver specific channel width definition to the the fw values */ 70/* Maps the driver specific channel width definition to the the fw values */
71static inline u8 iwl_mvm_get_channel_width(struct cfg80211_chan_def *chandef) 71u8 iwl_mvm_get_channel_width(struct cfg80211_chan_def *chandef)
72{ 72{
73 switch (chandef->width) { 73 switch (chandef->width) {
74 case NL80211_CHAN_WIDTH_20_NOHT: 74 case NL80211_CHAN_WIDTH_20_NOHT:
@@ -90,7 +90,7 @@ static inline u8 iwl_mvm_get_channel_width(struct cfg80211_chan_def *chandef)
90 * Maps the driver specific control channel position (relative to the center 90 * Maps the driver specific control channel position (relative to the center
91 * freq) definitions to the the fw values 91 * freq) definitions to the the fw values
92 */ 92 */
93static inline u8 iwl_mvm_get_ctrl_pos(struct cfg80211_chan_def *chandef) 93u8 iwl_mvm_get_ctrl_pos(struct cfg80211_chan_def *chandef)
94{ 94{
95 switch (chandef->chan->center_freq - chandef->center_freq1) { 95 switch (chandef->chan->center_freq - chandef->center_freq1) {
96 case -70: 96 case -70:
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
index 8d848735cdb8..4789c77632e5 100644
--- a/drivers/net/wireless/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
@@ -73,9 +73,9 @@
73/* 73/*
74 * Sets most of the Tx cmd's fields 74 * Sets most of the Tx cmd's fields
75 */ 75 */
76static void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb, 76void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
77 struct iwl_tx_cmd *tx_cmd, 77 struct iwl_tx_cmd *tx_cmd,
78 struct ieee80211_tx_info *info, u8 sta_id) 78 struct ieee80211_tx_info *info, u8 sta_id)
79{ 79{
80 struct ieee80211_hdr *hdr = (void *)skb->data; 80 struct ieee80211_hdr *hdr = (void *)skb->data;
81 __le16 fc = hdr->frame_control; 81 __le16 fc = hdr->frame_control;
@@ -149,11 +149,9 @@ static void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
149/* 149/*
150 * Sets the fields in the Tx cmd that are rate related 150 * Sets the fields in the Tx cmd that are rate related
151 */ 151 */
152static void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, 152void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd,
153 struct iwl_tx_cmd *tx_cmd, 153 struct ieee80211_tx_info *info,
154 struct ieee80211_tx_info *info, 154 struct ieee80211_sta *sta, __le16 fc)
155 struct ieee80211_sta *sta,
156 __le16 fc)
157{ 155{
158 u32 rate_flags; 156 u32 rate_flags;
159 int rate_idx; 157 int rate_idx;
@@ -232,10 +230,10 @@ static void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm,
232/* 230/*
233 * Sets the fields in the Tx cmd that are crypto related 231 * Sets the fields in the Tx cmd that are crypto related
234 */ 232 */
235static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm, 233void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm,
236 struct ieee80211_tx_info *info, 234 struct ieee80211_tx_info *info,
237 struct iwl_tx_cmd *tx_cmd, 235 struct iwl_tx_cmd *tx_cmd,
238 struct sk_buff *skb_frag) 236 struct sk_buff *skb_frag)
239{ 237{
240 struct ieee80211_key_conf *keyconf = info->control.hw_key; 238 struct ieee80211_key_conf *keyconf = info->control.hw_key;
241 239