Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ce73e65 authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Emmanuel Grumbach
Browse files

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: default avatarArik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 79920749
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -831,6 +831,16 @@ int __must_check iwl_mvm_send_cmd_pdu_status(struct iwl_mvm *mvm, u8 id,
int iwl_mvm_tx_skb(struct iwl_mvm *mvm, struct sk_buff *skb,
int iwl_mvm_tx_skb(struct iwl_mvm *mvm, struct sk_buff *skb,
		   struct ieee80211_sta *sta);
		   struct ieee80211_sta *sta);
int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb);
int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb);
void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
			struct iwl_tx_cmd *tx_cmd,
			struct ieee80211_tx_info *info, u8 sta_id);
void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm,
			       struct ieee80211_tx_info *info,
			       struct iwl_tx_cmd *tx_cmd,
			       struct sk_buff *skb_frag);
void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd,
			    struct ieee80211_tx_info *info,
			    struct ieee80211_sta *sta, __le16 fc);
#ifdef CONFIG_IWLWIFI_DEBUG
#ifdef CONFIG_IWLWIFI_DEBUG
const char *iwl_mvm_get_tx_fail_reason(u32 status);
const char *iwl_mvm_get_tx_fail_reason(u32 status);
#else
#else
@@ -900,6 +910,8 @@ void iwl_mvm_phy_ctxt_ref(struct iwl_mvm *mvm,
void iwl_mvm_phy_ctxt_unref(struct iwl_mvm *mvm,
void iwl_mvm_phy_ctxt_unref(struct iwl_mvm *mvm,
			    struct iwl_mvm_phy_ctxt *ctxt);
			    struct iwl_mvm_phy_ctxt *ctxt);
int iwl_mvm_phy_ctx_count(struct iwl_mvm *mvm);
int iwl_mvm_phy_ctx_count(struct iwl_mvm *mvm);
u8 iwl_mvm_get_channel_width(struct cfg80211_chan_def *chandef);
u8 iwl_mvm_get_ctrl_pos(struct cfg80211_chan_def *chandef);


/* MAC (virtual interface) programming */
/* MAC (virtual interface) programming */
int iwl_mvm_mac_ctxt_init(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
int iwl_mvm_mac_ctxt_init(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
+2 −2
Original line number Original line Diff line number Diff line
@@ -68,7 +68,7 @@
#include "mvm.h"
#include "mvm.h"


/* Maps the driver specific channel width definition to the the fw values */
/* Maps the driver specific channel width definition to the the fw values */
static inline u8 iwl_mvm_get_channel_width(struct cfg80211_chan_def *chandef)
u8 iwl_mvm_get_channel_width(struct cfg80211_chan_def *chandef)
{
{
	switch (chandef->width) {
	switch (chandef->width) {
	case NL80211_CHAN_WIDTH_20_NOHT:
	case NL80211_CHAN_WIDTH_20_NOHT:
@@ -90,7 +90,7 @@ static inline u8 iwl_mvm_get_channel_width(struct cfg80211_chan_def *chandef)
 * Maps the driver specific control channel position (relative to the center
 * Maps the driver specific control channel position (relative to the center
 * freq) definitions to the the fw values
 * freq) definitions to the the fw values
 */
 */
static inline u8 iwl_mvm_get_ctrl_pos(struct cfg80211_chan_def *chandef)
u8 iwl_mvm_get_ctrl_pos(struct cfg80211_chan_def *chandef)
{
{
	switch (chandef->chan->center_freq - chandef->center_freq1) {
	switch (chandef->chan->center_freq - chandef->center_freq1) {
	case -70:
	case -70:
+10 −12
Original line number Original line Diff line number Diff line
@@ -73,7 +73,7 @@
/*
/*
 * Sets most of the Tx cmd's fields
 * Sets most of the Tx cmd's fields
 */
 */
static void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
			struct iwl_tx_cmd *tx_cmd,
			struct iwl_tx_cmd *tx_cmd,
			struct ieee80211_tx_info *info, u8 sta_id)
			struct ieee80211_tx_info *info, u8 sta_id)
{
{
@@ -149,11 +149,9 @@ static void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
/*
/*
 * Sets the fields in the Tx cmd that are rate related
 * Sets the fields in the Tx cmd that are rate related
 */
 */
static void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm,
void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd,
				    struct iwl_tx_cmd *tx_cmd,
			    struct ieee80211_tx_info *info,
			    struct ieee80211_tx_info *info,
				    struct ieee80211_sta *sta,
			    struct ieee80211_sta *sta, __le16 fc)
				    __le16 fc)
{
{
	u32 rate_flags;
	u32 rate_flags;
	int rate_idx;
	int rate_idx;
@@ -232,7 +230,7 @@ static void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm,
/*
/*
 * Sets the fields in the Tx cmd that are crypto related
 * Sets the fields in the Tx cmd that are crypto related
 */
 */
static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm,
void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm,
			       struct ieee80211_tx_info *info,
			       struct ieee80211_tx_info *info,
			       struct iwl_tx_cmd *tx_cmd,
			       struct iwl_tx_cmd *tx_cmd,
			       struct sk_buff *skb_frag)
			       struct sk_buff *skb_frag)