mirror of
https://github.com/shenmintao/aic8800d80.git
synced 2026-09-26 17:44:16 +00:00
fix: support Linux 7.2 cfg80211 API
This commit is contained in:
@@ -4857,7 +4857,17 @@ rwnx_cfg80211_remain_on_channel(struct wiphy *wiphy,
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
|
||||
enum nl80211_channel_type channel_type,
|
||||
#endif
|
||||
unsigned int duration, u64 *cookie)
|
||||
unsigned int duration, u64 *cookie
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(7, 2, 0)
|
||||
/*
|
||||
* 7.2 added an optional receive address filter for the off-channel
|
||||
* period. cfg80211 refuses a non-NULL one unless the driver sets
|
||||
* NL80211_EXT_FEATURE_ROC_ADDR_FILTER, which this one does not, so it
|
||||
* is always NULL here. mac80211 ignores it in the same way.
|
||||
*/
|
||||
, const u8 *rx_addr
|
||||
#endif
|
||||
)
|
||||
{
|
||||
return rwnx_cfg80211_remain_on_channel_(wiphy,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
|
||||
|
||||
@@ -4849,7 +4849,13 @@ int rwnx_send_dbg_trigger_req(struct rwnx_hw *rwnx_hw, char *msg)
|
||||
return -ENOMEM;
|
||||
|
||||
/* Set parameters for the MM_DBG_TRIGGER_REQ message */
|
||||
strncpy(req->error, msg, sizeof(req->error));
|
||||
/*
|
||||
* strncpy() is gone in 7.2. req->error is a fixed 64-byte field of a
|
||||
* firmware message that is not NUL-terminated, and the message came
|
||||
* from kzalloc(), so copying at most the field size is all strncpy()
|
||||
* did here.
|
||||
*/
|
||||
memcpy(req->error, msg, strnlen(msg, sizeof(req->error)));
|
||||
|
||||
/* Send the MM_DBG_TRIGGER_REQ message to LMAC FW */
|
||||
return rwnx_send_msg(rwnx_hw, req, 0, -1, NULL);
|
||||
|
||||
Reference in New Issue
Block a user