Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Commit

Permalink
Update iwl7000 driver to core release 61
Browse files Browse the repository at this point in the history
Signed-off-by: Aiswarya Cyriac <[email protected]>
  • Loading branch information
aiswaryacyriac committed Jul 14, 2021
1 parent 27c5f04 commit 55c8d47
Show file tree
Hide file tree
Showing 73 changed files with 2,188 additions and 860 deletions.
4 changes: 3 additions & 1 deletion drivers/net/wireless/iwl7000/hdrs/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#define CPTCFG_IWLWIFI_DEBUG 1
#define CPTCFG_IWLWIFI_NUM_CHANNELS 1
#define CPTCFG_IWLWIFI_SUPPORT_DEBUG_OVERRIDES 1
#define CPTCFG_IWLWIFI_DISALLOW_OLDER_FW 1
//#define CPTCFG_IWLWIFI_DISALLOW_OLDER_FW 1
#define CPTCFG_IWLWIFI_NUM_STA_INTERFACES 1
#define CPTCFG_REJECT_NONUPSTREAM_NL80211 1
#define CPTCFG_IWLWIFI_ATLAS_PLATFORM_WORKAROUND 1
Expand Down Expand Up @@ -77,4 +77,6 @@
#define CPTCFG_IWLMVM_VENDOR_CMDS 1
#endif

#define CPTCFG_IWLWIFI_DHC 1

#endif
5 changes: 2 additions & 3 deletions drivers/net/wireless/iwl7000/hdrs/linux/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -2179,6 +2179,8 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap,
#define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_RESERVED 0xc0
#define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_MASK 0xc0

#define IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF 0x01

/* 802.11ax HE TX/RX MCS NSS Support */
#define IEEE80211_TX_RX_MCS_NSS_SUPP_HIGHEST_MCS_POS (3)
#define IEEE80211_TX_RX_MCS_NSS_SUPP_TX_BITMAP_POS (6)
Expand Down Expand Up @@ -3865,9 +3867,6 @@ struct ieee80211_neighbor_ap_info {
u8 channel;
} __packed;

#define IEEE80211_MIN_AP_NEIGHBOR_INFO_SIZE \
sizeof(struct ieee80211_neighbor_ap_info)

enum ieee80211_range_params_max_total_ltf {
IEEE80211_RANGE_PARAMS_MAX_TOTAL_LTF_4 = 0,
IEEE80211_RANGE_PARAMS_MAX_TOTAL_LTF_8,
Expand Down
223 changes: 119 additions & 104 deletions drivers/net/wireless/iwl7000/hdrs/mac80211-bp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,79 @@ ieee80211_get_he_sta_cap(const struct ieee80211_supported_band *sband)
return NULL;
}

#endif
static inline void
ieee80211_sband_set_num_iftypes_data(struct ieee80211_supported_band *sband,
u16 n)
{
}

static inline u16
ieee80211_sband_get_num_iftypes_data(struct ieee80211_supported_band *sband)
{
return 0;
}

static inline void
ieee80211_sband_set_iftypes_data(struct ieee80211_supported_band *sband,
const struct ieee80211_sband_iftype_data *data)
{
}

static inline struct ieee80211_sband_iftype_data *
ieee80211_sband_get_iftypes_data(struct ieee80211_supported_band *sband)
{
return NULL;
}

static inline struct ieee80211_sband_iftype_data *
ieee80211_sband_get_iftypes_data_entry(struct ieee80211_supported_band *sband,
u16 i)
{
WARN_ONCE(1,
"Tried to use unsupported sband iftype data\n");
return NULL;
}

static inline const struct ieee80211_sband_iftype_data *
ieee80211_get_sband_iftype_data(const struct ieee80211_supported_band *sband,
u8 iftype)
{
return NULL;
}
#else /* CFG80211_VERSION < KERNEL_VERSION(4,19,0) */
static inline void
ieee80211_sband_set_num_iftypes_data(struct ieee80211_supported_band *sband,
u16 n)
{
sband->n_iftype_data = n;
}

static inline u16
ieee80211_sband_get_num_iftypes_data(struct ieee80211_supported_band *sband)
{
return sband->n_iftype_data;
}

static inline void
ieee80211_sband_set_iftypes_data(struct ieee80211_supported_band *sband,
const struct ieee80211_sband_iftype_data *data)
{
sband->iftype_data = data;
}

static inline const struct ieee80211_sband_iftype_data *
ieee80211_sband_get_iftypes_data(struct ieee80211_supported_band *sband)
{
return sband->iftype_data;
}

static inline const struct ieee80211_sband_iftype_data *
ieee80211_sband_get_iftypes_data_entry(struct ieee80211_supported_band *sband,
u16 i)
{
return &sband->iftype_data[i];
}
#endif /* CFG80211_VERSION < KERNEL_VERSION(4,19,0) */

#if CFG80211_VERSION < KERNEL_VERSION(5,8,0)
/**
Expand Down Expand Up @@ -1240,6 +1312,12 @@ static inline const struct ieee80211_sta_he_cap *
ieee80211_get_he_iftype_cap(const struct ieee80211_supported_band *sband,
u8 iftype)
{
const struct ieee80211_sband_iftype_data *data =
ieee80211_get_sband_iftype_data(sband, iftype);

if (data && data->he_cap.has_he)
return &data->he_cap;

return NULL;
}

Expand Down Expand Up @@ -1957,81 +2035,6 @@ static inline void u64_to_ether_addr(u64 u, u8 *addr)
}
#endif /* < 4,11,0 */

#if CFG80211_VERSION < KERNEL_VERSION(4, 19, 0)
static inline void
ieee80211_sband_set_num_iftypes_data(struct ieee80211_supported_band *sband,
u16 n)
{
}

static inline u16
ieee80211_sband_get_num_iftypes_data(struct ieee80211_supported_band *sband)
{
return 0;
}

static inline void
ieee80211_sband_set_iftypes_data(struct ieee80211_supported_band *sband,
const struct ieee80211_sband_iftype_data *data)
{
}

static inline struct ieee80211_sband_iftype_data *
ieee80211_sband_get_iftypes_data(struct ieee80211_supported_band *sband)
{
return NULL;
}

static inline struct ieee80211_sband_iftype_data *
ieee80211_sband_get_iftypes_data_entry(struct ieee80211_supported_band *sband,
u16 i)
{
WARN_ONCE(1,
"Tried to use unsupported sband iftype data\n");
return NULL;
}

static inline const struct ieee80211_sband_iftype_data *
ieee80211_get_sband_iftype_data(const struct ieee80211_supported_band *sband,
u8 iftype)
{
return NULL;
}
#else /* CFG80211_VERSION < KERNEL_VERSION(4,19,0) */
static inline void
ieee80211_sband_set_num_iftypes_data(struct ieee80211_supported_band *sband,
u16 n)
{
sband->n_iftype_data = n;
}

static inline u16
ieee80211_sband_get_num_iftypes_data(struct ieee80211_supported_band *sband)
{
return sband->n_iftype_data;
}

static inline void
ieee80211_sband_set_iftypes_data(struct ieee80211_supported_band *sband,
const struct ieee80211_sband_iftype_data *data)
{
sband->iftype_data = data;
}

static inline const struct ieee80211_sband_iftype_data *
ieee80211_sband_get_iftypes_data(struct ieee80211_supported_band *sband)
{
return sband->iftype_data;
}

static inline const struct ieee80211_sband_iftype_data *
ieee80211_sband_get_iftypes_data_entry(struct ieee80211_supported_band *sband,
u16 i)
{
return &sband->iftype_data[i];
}
#endif /* CFG80211_VERSION < KERNEL_VERSION(4,19,0) */

#if CFG80211_VERSION < KERNEL_VERSION(5,1,0)
static inline int cfg80211_vendor_cmd_get_sender(struct wiphy *wiphy)
{
Expand Down Expand Up @@ -2165,7 +2168,7 @@ static inline size_t cfg80211_rekey_akm(struct cfg80211_gtk_rekey_data *data)
#endif
}

#if CFG80211_VERSION < KERNEL_VERSION(5,7,0)
#if CFG80211_VERSION < KERNEL_VERSION(5,4,0)
/**
* struct cfg80211_he_bss_color - AP settings for BSS coloring
*
Expand All @@ -2178,6 +2181,9 @@ struct cfg80211_he_bss_color {
bool disabled;
bool partial;
};
#endif

#if CFG80211_VERSION < KERNEL_VERSION(5,7,0)

/**
* enum nl80211_tid_config - TID config state
Expand Down Expand Up @@ -2563,18 +2569,6 @@ static inline void dev_sw_netstats_rx_add(struct net_device *dev, unsigned int l
u64_stats_update_end(&tstats->syncp);
}

static inline void dev_sw_netstats_tx_add(struct net_device *dev,
unsigned int packets,
unsigned int len)
{
struct pcpu_sw_netstats *tstats = this_cpu_ptr(dev->tstats);

u64_stats_update_begin(&tstats->syncp);
tstats->tx_bytes += len;
tstats->tx_packets += packets;
u64_stats_update_end(&tstats->syncp);
}

#define bp_ieee80211_set_unsol_bcast_probe_resp(sdata, params) 0
#define bp_unsol_bcast_probe_resp_interval(params) 0

Expand All @@ -2587,21 +2581,9 @@ static inline void dev_sw_netstats_tx_add(struct net_device *dev,

#endif /* < 5.10 */

#if CFG80211_VERSION < KERNEL_VERSION(5,13,0)
#define ieee80211_data_to_8023_exthdr iwl7000_ieee80211_data_to_8023_exthdr
int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,
const u8 *addr, enum nl80211_iftype iftype,
u8 data_offset, bool is_amsdu);

#define ieee80211_data_to_8023 iwl7000_ieee80211_data_to_8023
static inline int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
enum nl80211_iftype iftype)
{
return ieee80211_data_to_8023_exthdr(skb, NULL, addr, iftype, 0, false);
}
#endif /* CFG80211_VERSION < KERNEL_VERSION(5,13,0) */

#if CFG80211_VERSION < KERNEL_VERSION(5,4,0)
#if CFG80211_VERSION < KERNEL_VERSION(5,11,0) && \
(CFG80211_VERSION < KERNEL_VERSION(5,4,0) || \
CFG80211_VERSION >= KERNEL_VERSION(5,5,0))
enum nl80211_sar_type {
NL80211_SAR_TYPE_NONE,
};
Expand Down Expand Up @@ -2657,3 +2639,36 @@ static inline bool cfg80211_any_usable_channels(struct wiphy *wiphy,
return false;
}
#endif /* < 5.12.0 */

#if LINUX_VERSION_IS_LESS(5,11,0)
static inline u64 skb_get_kcov_handle(struct sk_buff *skb)
{
return 0;
}

static inline void dev_sw_netstats_tx_add(struct net_device *dev,
unsigned int packets,
unsigned int len)
{
struct pcpu_sw_netstats *tstats = this_cpu_ptr(dev->tstats);

u64_stats_update_begin(&tstats->syncp);
tstats->tx_bytes += len;
tstats->tx_packets += packets;
u64_stats_update_end(&tstats->syncp);
}
#endif

#if CFG80211_VERSION < KERNEL_VERSION(5,13,0)
#define ieee80211_data_to_8023_exthdr iwl7000_ieee80211_data_to_8023_exthdr
int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,
const u8 *addr, enum nl80211_iftype iftype,
u8 data_offset, bool is_amsdu);

#define ieee80211_data_to_8023 iwl7000_ieee80211_data_to_8023
static inline int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
enum nl80211_iftype iftype)
{
return ieee80211_data_to_8023_exthdr(skb, NULL, addr, iftype, 0, false);
}
#endif /* CFG80211_VERSION < KERNEL_VERSION(5,13,0) */
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwl7000/hdrs/version.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef __IWL_CHROME_VERSION_H
#define __IWL_CHROME_VERSION_H

#define BACKPORTS_GIT_TRACKED "chromium:" UTS_RELEASE ":core61-58:"
#define BACKPORTS_GIT_TRACKED "chromium:" UTS_RELEASE ":core62-50-2:"

#endif /* __IWL_CHROME_VERSION_H */
3 changes: 0 additions & 3 deletions drivers/net/wireless/iwl7000/iwlwifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ iwlwifi-$(CPTCFG_IWLMVM) += cfg/9000.o cfg/22000.o

iwlwifi-$(CPTCFG_IWLWIFI_SUPPORT_DEBUG_OVERRIDES) += iwl-dbg-cfg.o

ifeq ($(CPTCFG_NO_DMA),y)
endif

iwlwifi-objs += $(iwlwifi-m)
iwlwifi-objs += $(iwlwifi-y)

Expand Down
Loading

0 comments on commit 55c8d47

Please sign in to comment.