aboutsummaryrefslogtreecommitdiff
path: root/include/sound/sof/ipc4
ModeNameSize
-rw-r--r--header.h17893logplain
_OID_CHANNEL, &channel); mgt_set(priv, DOT11_OID_AUTHENABLE, &authen); mgt_set(priv, DOT11_OID_PRIVACYINVOKED, &wep); mgt_set(priv, DOT11_OID_PSMBUFFER, &psm_buffer); mgt_set(priv, DOT11_OID_EXUNENCRYPTED, &filter); mgt_set(priv, DOT11_OID_DOT1XENABLE, &dot1x); mgt_set(priv, DOT11_OID_MLMEAUTOLEVEL, &mlme); mgt_set(priv, OID_INL_DOT11D_CONFORMANCE, &conformance); mgt_set(priv, OID_INL_OUTPUTPOWER, &power); /* This sets all of the mode-dependent values */ prism54_mib_mode_helper(priv, mode); } /* this will be executed outside of atomic context thanks to * schedule_work(), thus we can as well use sleeping semaphore * locking */ void prism54_update_stats(struct work_struct *work) { islpci_private *priv = container_of(work, islpci_private, stats_work); char *data; int j; struct obj_bss bss, *bss2; union oid_res_t r; mutex_lock(&priv->stats_lock); /* Noise floor. * I'm not sure if the unit is dBm. * Note : If we are not connected, this value seems to be irrelevant. */ mgt_get_request(priv, DOT11_OID_NOISEFLOOR, 0, NULL, &r); priv->local_iwstatistics.qual.noise = r.u; /* Get the rssi of the link. To do this we need to retrieve a bss. */ /* First get the MAC address of the AP we are associated with. */ mgt_get_request(priv, DOT11_OID_BSSID, 0, NULL, &r); data = r.ptr; /* copy this MAC to the bss */ memcpy(bss.address, data, ETH_ALEN); kfree(data); /* now ask for the corresponding bss */ j = mgt_get_request(priv, DOT11_OID_BSSFIND, 0, (void *) &bss, &r); bss2 = r.ptr; /* report the rssi and use it to calculate * link quality through a signal-noise * ratio */ priv->local_iwstatistics.qual.level = bss2->rssi; priv->local_iwstatistics.qual.qual = bss2->rssi - priv->iwstatistics.qual.noise; kfree(bss2); /* report that the stats are new */ priv->local_iwstatistics.qual.updated = 0x7; /* Rx : unable to decrypt the MPDU */ mgt_get_request(priv, DOT11_OID_PRIVRXFAILED, 0, NULL, &r); priv->local_iwstatistics.discard.code = r.u; /* Tx : Max MAC retries num reached */ mgt_get_request(priv, DOT11_OID_MPDUTXFAILED, 0, NULL, &r); priv->local_iwstatistics.discard.retries = r.u; mutex_unlock(&priv->stats_lock); } struct iw_statistics * prism54_get_wireless_stats(struct net_device *ndev) { islpci_private *priv = netdev_priv(ndev); /* If the stats are being updated return old data */ if (mutex_trylock(&priv->stats_lock)) { memcpy(&priv->iwstatistics, &priv->local_iwstatistics, sizeof (struct iw_statistics)); /* They won't be marked updated for the next time */ priv->local_iwstatistics.qual.updated = 0; mutex_unlock(&priv->stats_lock); } else priv->iwstatistics.qual.updated = 0; /* Update our wireless stats, but do not schedule to often * (max 1 HZ) */ if ((priv->stats_timestamp == 0) || time_after(jiffies, priv->stats_timestamp + 1 * HZ)) { schedule_work(&priv->stats_work); priv->stats_timestamp = jiffies; } return &priv->iwstatistics; } static int prism54_commit(struct net_device *ndev, struct iw_request_info *info, char *cwrq, char *extra) { islpci_private *priv = netdev_priv(ndev); /* simply re-set the last set SSID, this should commit most stuff */ /* Commit in Monitor mode is not necessary, also setting essid * in Monitor mode does not make sense and isn't allowed for this * device's firmware */ if (priv->iw_mode != IW_MODE_MONITOR) return mgt_set_request(priv, DOT11_OID_SSID, 0, NUL