mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
wiphy: Add wiphy_get_rsnxe
Returns a template RSNX element that can be further modified by callers to set any additional capabilities if required. wiphy will fill in those capabilities that are driver / firmware dependent.
This commit is contained in:
parent
3f42e4df25
commit
57a57646d8
20
src/wiphy.c
20
src/wiphy.c
@ -551,6 +551,26 @@ const uint8_t *wiphy_get_rm_enabled_capabilities(struct wiphy *wiphy)
|
|||||||
return wiphy->rm_enabled_capabilities;
|
return wiphy->rm_enabled_capabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wiphy_get_rsnxe(const struct wiphy *wiphy, uint8_t *buf, size_t len)
|
||||||
|
{
|
||||||
|
if (len < 3)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
buf[0] = IE_TYPE_RSNX;
|
||||||
|
buf[1] = 1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Lower 4 bits of the first octet:
|
||||||
|
* The length of the Extended RSN Capabilities field, in octets,
|
||||||
|
* minus 1, i.e., n - 1.
|
||||||
|
*/
|
||||||
|
buf[2] = 0;
|
||||||
|
|
||||||
|
/* No other bits set for now */
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static void wiphy_address_constrain(struct wiphy *wiphy, uint8_t addr[static 6])
|
static void wiphy_address_constrain(struct wiphy *wiphy, uint8_t addr[static 6])
|
||||||
{
|
{
|
||||||
switch (mac_randomize_bytes) {
|
switch (mac_randomize_bytes) {
|
||||||
|
@ -101,6 +101,7 @@ const uint8_t *wiphy_get_permanent_address(struct wiphy *wiphy);
|
|||||||
const uint8_t *wiphy_get_extended_capabilities(struct wiphy *wiphy,
|
const uint8_t *wiphy_get_extended_capabilities(struct wiphy *wiphy,
|
||||||
uint32_t iftype);
|
uint32_t iftype);
|
||||||
const uint8_t *wiphy_get_rm_enabled_capabilities(struct wiphy *wiphy);
|
const uint8_t *wiphy_get_rm_enabled_capabilities(struct wiphy *wiphy);
|
||||||
|
bool wiphy_get_rsnxe(const struct wiphy *wiphy, uint8_t *buf, size_t len);
|
||||||
void wiphy_get_reg_domain_country(struct wiphy *wiphy, char *out);
|
void wiphy_get_reg_domain_country(struct wiphy *wiphy, char *out);
|
||||||
|
|
||||||
void wiphy_generate_random_address(struct wiphy *wiphy, uint8_t addr[static 6]);
|
void wiphy_generate_random_address(struct wiphy *wiphy, uint8_t addr[static 6]);
|
||||||
|
Loading…
Reference in New Issue
Block a user