Skip to content

platform: add the plumbing to get the CSME connection info

This includes the Intel vendor commands (merged in kernel 5.17) and all the utils functions up the layer that hopefully will us this.

Tested with the following test code:

    /* Log new killswitch state */
    new_rfkilled = rstate->hw_enabled && rstate->sw_enabled;
    if (old_rfkilled != new_rfkilled) {
        _LOGI(LOGD_RFKILL,
              "rfkill: %s now %s by radio killswitch",
              nm_rfkill_type_to_string(rtype),
              new_rfkilled ? "enabled" : "disabled");
    }    

    if (!rstate->os_owner) {
            NMPlatformCsmeConnInfo  conn_info;
            NMDevice               *device;
            const CList            *tmp_lst;

            nm_manager_for_each_device(self, device, tmp_lst) {
                    if (nm_device_get_device_type(device) != NM_DEVICE_TYPE_WIFI)
                            continue;

                    if ( nm_platform_wifi_get_csme_conn_info(priv->platform,
                                                             nm_device_get_ifindex(device),
                                                             &conn_info)) {

                            _LOGW(LOGD_RFKILL,
                                  "rfkill: CSME is associated to SSID %s on channel %d",
                                  conn_info.ssid, conn_info.channel);

                            nm_platform_wifi_get_device_from_csme(priv->platform, nm_device_get_ifindex(device));
                    }
            }
    } 
Edited by Emmanuel Grumbach

Merge request reports