mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 14:49:24 +01:00
wired: Default to using PAE group address for transmission
This commit is contained in:
parent
15a19330da
commit
60a74c46a0
@ -65,6 +65,7 @@ struct ethdev {
|
|||||||
struct eapol {
|
struct eapol {
|
||||||
struct ethdev *dev;
|
struct ethdev *dev;
|
||||||
uint8_t addr[ETH_ALEN];
|
uint8_t addr[ETH_ALEN];
|
||||||
|
bool use_group_addr;
|
||||||
struct eap_state *eap;
|
struct eap_state *eap;
|
||||||
struct l_settings *cred;
|
struct l_settings *cred;
|
||||||
};
|
};
|
||||||
@ -153,6 +154,9 @@ static void eap_tx_packet(const uint8_t *eap_data, size_t len, void *user_data)
|
|||||||
l_put_be16(len, frame + 2);
|
l_put_be16(len, frame + 2);
|
||||||
memcpy(frame + 4, eap_data, len);
|
memcpy(frame + 4, eap_data, len);
|
||||||
|
|
||||||
|
if (eapol->use_group_addr)
|
||||||
|
pae_write(eapol->dev, pae_group_addr, frame, len + 4);
|
||||||
|
else
|
||||||
pae_write(eapol->dev, eapol->addr, frame, len + 4);
|
pae_write(eapol->dev, eapol->addr, frame, len + 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,6 +203,7 @@ static void rx_packet(struct ethdev *dev, const uint8_t *addr,
|
|||||||
eapol = l_new(struct eapol, 1);
|
eapol = l_new(struct eapol, 1);
|
||||||
eapol->dev = dev;
|
eapol->dev = dev;
|
||||||
memcpy(eapol->addr, addr, ETH_ALEN);
|
memcpy(eapol->addr, addr, ETH_ALEN);
|
||||||
|
eapol->use_group_addr = true;
|
||||||
eapol->eap = eap_new(eap_tx_packet,
|
eapol->eap = eap_new(eap_tx_packet,
|
||||||
eap_complete, eapol);
|
eap_complete, eapol);
|
||||||
if (!eapol->eap) {
|
if (!eapol->eap) {
|
||||||
|
Loading…
Reference in New Issue
Block a user