* @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
*/
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__ */
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),
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)
{
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);
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)
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)
};