Skip to content

Commit

Permalink
Fix issue #58: fix build on Linux v4.6
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Scheurer <git@tinytux.ch>
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
  • Loading branch information
tinytux authored and kuba-moo committed Dec 6, 2016
1 parent 51657d5 commit 91d95bc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions init.c
Expand Up @@ -471,7 +471,7 @@ struct mt7601u_dev *mt7601u_alloc_device(struct device *pdev)
}

#define CHAN2G(_idx, _freq) { \
.band = IEEE80211_BAND_2GHZ, \
.band = NL80211_BAND_2GHZ, \
.center_freq = (_freq), \
.hw_value = (_idx), \
.max_power = 30, \
Expand Down Expand Up @@ -565,7 +565,7 @@ mt76_init_sband_2g(struct mt7601u_dev *dev)
{
dev->sband_2g = devm_kzalloc(dev->dev, sizeof(*dev->sband_2g),
GFP_KERNEL);
dev->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = dev->sband_2g;
dev->hw->wiphy->bands[NL80211_BAND_2GHZ] = dev->sband_2g;

WARN_ON(dev->ee->reg.start - 1 + dev->ee->reg.num >
ARRAY_SIZE(mt76_channels_2ghz));
Expand Down
16 changes: 15 additions & 1 deletion main.c
Expand Up @@ -338,9 +338,23 @@ static int mt7601u_set_rts_threshold(struct ieee80211_hw *hw, u32 value)

static int
mt76_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
struct ieee80211_ampdu_params *params
#else
enum ieee80211_ampdu_mlme_action action,
struct ieee80211_sta *sta, u16 tid, u16 *ssn, u8 buf_size)
struct ieee80211_sta *sta, u16 tid, u16 *ssn, u8 buf_size
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
, bool amsdu
#endif
#endif
)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
enum ieee80211_ampdu_mlme_action action = params->action;
struct ieee80211_sta *sta = params->sta;
u16 *ssn = &params->ssn;
u16 tid = params->tid;
#endif
struct mt7601u_dev *dev = hw->priv;
struct mt76_sta *msta = (struct mt76_sta *) sta->drv_priv;

Expand Down

0 comments on commit 91d95bc

Please sign in to comment.