mirror of
https://github.com/shenmintao/aic8800d80.git
synced 2026-09-26 17:44:16 +00:00
Merge pull request #18 from vorasilp/6.17
fix compilation error for kernel 6.17
This commit is contained in:
@@ -4278,7 +4278,11 @@ void rwnx_cfg80211_mgmt_frame_register(struct wiphy *wiphy,
|
||||
* have changed. The actual parameter values are available in
|
||||
* struct wiphy. If returning an error, no value should be changed.
|
||||
*/
|
||||
static int rwnx_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
|
||||
static int rwnx_cfg80211_set_wiphy_params(struct wiphy *wiphy,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)
|
||||
int radio_idx,
|
||||
#endif
|
||||
u32 changed)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -4294,6 +4298,9 @@ static int rwnx_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
|
||||
static int rwnx_cfg80211_set_tx_power(struct wiphy *wiphy,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
struct wireless_dev *wdev,
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)
|
||||
int radio_idx,
|
||||
#endif
|
||||
enum nl80211_tx_power_setting type, int mbm)
|
||||
{
|
||||
|
||||
@@ -2368,7 +2368,11 @@ check_len_update:
|
||||
hdr = (struct ieee80211_hdr *)(skb->data + msdu_offset);
|
||||
rwnx_vif = rwnx_rx_get_vif(rwnx_hw, hw_rxhdr->flags_vif_idx);
|
||||
if (rwnx_vif) {
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 17, 0)
|
||||
cfg80211_rx_spurious_frame(rwnx_vif->ndev, hdr->addr2, GFP_ATOMIC);
|
||||
#else
|
||||
cfg80211_rx_spurious_frame(rwnx_vif->ndev, hdr->addr2, UNKNOWN_LINK_ID, GFP_ATOMIC);
|
||||
#endif
|
||||
}
|
||||
goto end;
|
||||
}
|
||||
@@ -2618,8 +2622,15 @@ check_len_update:
|
||||
}
|
||||
|
||||
if (hw_rxhdr->flags_is_4addr && !rwnx_vif->use_4addr) {
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 17, 0)
|
||||
cfg80211_rx_unexpected_4addr_frame(rwnx_vif->ndev,
|
||||
sta->mac_addr, GFP_ATOMIC);
|
||||
#else
|
||||
cfg80211_rx_unexpected_4addr_frame(rwnx_vif->ndev,
|
||||
sta->mac_addr,
|
||||
UNKNOWN_LINK_ID,
|
||||
GFP_ATOMIC);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -405,4 +405,8 @@ struct element {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)
|
||||
#define UNKNOWN_LINK_ID -1
|
||||
#endif
|
||||
|
||||
#endif /* _RWNX_RX_H_ */
|
||||
|
||||
Reference in New Issue
Block a user