mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
wifi: iwlwifi: mld: add handler for NAN ULW attribute notification
When a notification about a new ULW attribute arrives, send it to user space so the ULW attribute can be added to the relevant frames (e.g. SDF). Signed-off-by: Avraham Stern <avraham.stern@intel.com> Link: https://patch.msgid.link/20260513084215.76d980e195a7.Ide4aaf4553a3980e6990485cd37204a922c36913@changeid Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
This commit is contained in:
parent
54d48636df
commit
ba3b38d38a
|
|
@ -80,6 +80,10 @@ enum iwl_mac_conf_subcmd_ids {
|
|||
* @NAN_PEER_CMD: &struct iwl_nan_peer_cmd
|
||||
*/
|
||||
NAN_PEER_CMD = 0x14,
|
||||
/**
|
||||
* @NAN_ULW_ATTR_NOTIF: &struct iwl_nan_ulw_attr_notif
|
||||
*/
|
||||
NAN_ULW_ATTR_NOTIF = 0xf2,
|
||||
/**
|
||||
* @NAN_DW_END_NOTIF: &struct iwl_nan_dw_end_notif
|
||||
*/
|
||||
|
|
@ -1393,4 +1397,20 @@ struct iwl_nan_dw_end_notif {
|
|||
u8 reserved[3];
|
||||
} __packed; /* NAN_DW_END_NTF_API_S_VER_1 */
|
||||
|
||||
#define IWL_NAN_MAX_ENDLESS_ULW_ATTR_LEN 48
|
||||
|
||||
/**
|
||||
* struct iwl_nan_ulw_attr_notif - sent to notify the host of a change in the
|
||||
* ULW attribute
|
||||
*
|
||||
* @attr_len: length of the ULW attribute in bytes
|
||||
* @reserved: reserved
|
||||
* @attr: the ULW attribute including the attribute header
|
||||
*/
|
||||
struct iwl_nan_ulw_attr_notif {
|
||||
u8 attr_len;
|
||||
u8 reserved[3];
|
||||
u8 attr[IWL_NAN_MAX_ENDLESS_ULW_ATTR_LEN];
|
||||
} __packed; /* NAN_ULW_ATTR_NOTIF_API_S_VER_1 */
|
||||
|
||||
#endif /* __iwl_fw_api_mac_cfg_h__ */
|
||||
|
|
|
|||
|
|
@ -237,6 +237,7 @@ static const struct iwl_hcmd_names iwl_mld_mac_conf_names[] = {
|
|||
HCMD_NAME(NAN_CFG_CMD),
|
||||
HCMD_NAME(NAN_SCHEDULE_CMD),
|
||||
HCMD_NAME(NAN_PEER_CMD),
|
||||
HCMD_NAME(NAN_ULW_ATTR_NOTIF),
|
||||
HCMD_NAME(NAN_DW_END_NOTIF),
|
||||
HCMD_NAME(NAN_JOINED_CLUSTER_NOTIF),
|
||||
HCMD_NAME(MISSED_BEACONS_NOTIF),
|
||||
|
|
|
|||
|
|
@ -353,6 +353,39 @@ bool iwl_mld_cancel_nan_dw_end_notif(struct iwl_mld *mld,
|
|||
return true;
|
||||
}
|
||||
|
||||
bool iwl_mld_cancel_nan_ulw_attr_notif(struct iwl_mld *mld,
|
||||
struct iwl_rx_packet *pkt,
|
||||
u32 obj_id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void iwl_mld_handle_nan_ulw_attr_notif(struct iwl_mld *mld,
|
||||
struct iwl_rx_packet *pkt)
|
||||
{
|
||||
struct iwl_nan_ulw_attr_notif *notif = (void *)pkt->data;
|
||||
struct wireless_dev *wdev;
|
||||
|
||||
IWL_DEBUG_INFO(mld, "NAN: ULW attr update: len=%u\n", notif->attr_len);
|
||||
|
||||
if (IWL_FW_CHECK(mld, !mld->nan_device_vif,
|
||||
"NAN: ULW attr update without NAN vif\n"))
|
||||
return;
|
||||
|
||||
if (IWL_FW_CHECK(mld, !ieee80211_vif_nan_started(mld->nan_device_vif),
|
||||
"NAN: ULW attr update without NAN started\n"))
|
||||
return;
|
||||
|
||||
if (IWL_FW_CHECK(mld,
|
||||
notif->attr_len > IWL_NAN_MAX_ENDLESS_ULW_ATTR_LEN,
|
||||
"NAN: ULW attr update invalid len %u\n",
|
||||
notif->attr_len))
|
||||
return;
|
||||
|
||||
wdev = ieee80211_vif_to_wdev(mld->nan_device_vif);
|
||||
cfg80211_nan_ulw_update(wdev, notif->attr, notif->attr_len, GFP_KERNEL);
|
||||
}
|
||||
|
||||
void iwl_mld_handle_nan_dw_end_notif(struct iwl_mld *mld,
|
||||
struct iwl_rx_packet *pkt)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,11 +38,16 @@ int iwl_mld_stop_nan(struct ieee80211_hw *hw,
|
|||
struct ieee80211_vif *vif);
|
||||
void iwl_mld_handle_nan_cluster_notif(struct iwl_mld *mld,
|
||||
struct iwl_rx_packet *pkt);
|
||||
void iwl_mld_handle_nan_ulw_attr_notif(struct iwl_mld *mld,
|
||||
struct iwl_rx_packet *pkt);
|
||||
void iwl_mld_handle_nan_dw_end_notif(struct iwl_mld *mld,
|
||||
struct iwl_rx_packet *pkt);
|
||||
bool iwl_mld_cancel_nan_cluster_notif(struct iwl_mld *mld,
|
||||
struct iwl_rx_packet *pkt,
|
||||
u32 obj_id);
|
||||
bool iwl_mld_cancel_nan_ulw_attr_notif(struct iwl_mld *mld,
|
||||
struct iwl_rx_packet *pkt,
|
||||
u32 obj_id);
|
||||
bool iwl_mld_cancel_nan_dw_end_notif(struct iwl_mld *mld,
|
||||
struct iwl_rx_packet *pkt,
|
||||
u32 obj_id);
|
||||
|
|
|
|||
|
|
@ -346,6 +346,7 @@ CMD_VERSIONS(time_sync_confirm_notif,
|
|||
CMD_VERSIONS(ftm_resp_notif, CMD_VER_ENTRY(10, iwl_tof_range_rsp_ntfy))
|
||||
CMD_VERSIONS(beacon_filter_notif, CMD_VER_ENTRY(2, iwl_beacon_filter_notif))
|
||||
CMD_VERSIONS(nan_cluster_notif, CMD_VER_ENTRY(1, iwl_nan_cluster_notif))
|
||||
CMD_VERSIONS(nan_ulw_attr_notif, CMD_VER_ENTRY(1, iwl_nan_ulw_attr_notif))
|
||||
CMD_VERSIONS(nan_dw_end_notif, CMD_VER_ENTRY(1, iwl_nan_dw_end_notif))
|
||||
|
||||
DEFINE_SIMPLE_CANCELLATION(session_prot, iwl_session_prot_notif, mac_link_id)
|
||||
|
|
@ -463,6 +464,8 @@ const struct iwl_rx_handler iwl_mld_rx_handlers[] = {
|
|||
ftm_resp_notif)
|
||||
RX_HANDLER_OF_NAN(MAC_CONF_GROUP, NAN_JOINED_CLUSTER_NOTIF,
|
||||
nan_cluster_notif)
|
||||
RX_HANDLER_OF_NAN(MAC_CONF_GROUP, NAN_ULW_ATTR_NOTIF,
|
||||
nan_ulw_attr_notif)
|
||||
RX_HANDLER_OF_NAN(MAC_CONF_GROUP, NAN_DW_END_NOTIF,
|
||||
nan_dw_end_notif)
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user