diff options
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/wmi.c')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wmi.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 021313524913..9fe2085be2c5 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c | |||
@@ -466,7 +466,7 @@ static void wmi_evt_connect(struct wil6210_priv *wil, int id, void *d, int len) | |||
466 | 466 | ||
467 | /* FIXME FW can transmit only ucast frames to peer */ | 467 | /* FIXME FW can transmit only ucast frames to peer */ |
468 | /* FIXME real ring_id instead of hard coded 0 */ | 468 | /* FIXME real ring_id instead of hard coded 0 */ |
469 | memcpy(wil->sta[evt->cid].addr, evt->bssid, ETH_ALEN); | 469 | ether_addr_copy(wil->sta[evt->cid].addr, evt->bssid); |
470 | wil->sta[evt->cid].status = wil_sta_conn_pending; | 470 | wil->sta[evt->cid].status = wil_sta_conn_pending; |
471 | 471 | ||
472 | wil->pending_connect_cid = evt->cid; | 472 | wil->pending_connect_cid = evt->cid; |
@@ -524,8 +524,8 @@ static void wmi_evt_eapol_rx(struct wil6210_priv *wil, int id, | |||
524 | } | 524 | } |
525 | 525 | ||
526 | eth = (struct ethhdr *)skb_put(skb, ETH_HLEN); | 526 | eth = (struct ethhdr *)skb_put(skb, ETH_HLEN); |
527 | memcpy(eth->h_dest, ndev->dev_addr, ETH_ALEN); | 527 | ether_addr_copy(eth->h_dest, ndev->dev_addr); |
528 | memcpy(eth->h_source, evt->src_mac, ETH_ALEN); | 528 | ether_addr_copy(eth->h_source, evt->src_mac); |
529 | eth->h_proto = cpu_to_be16(ETH_P_PAE); | 529 | eth->h_proto = cpu_to_be16(ETH_P_PAE); |
530 | memcpy(skb_put(skb, eapol_len), evt->eapol, eapol_len); | 530 | memcpy(skb_put(skb, eapol_len), evt->eapol, eapol_len); |
531 | skb->protocol = eth_type_trans(skb, ndev); | 531 | skb->protocol = eth_type_trans(skb, ndev); |
@@ -851,7 +851,7 @@ int wmi_set_mac_address(struct wil6210_priv *wil, void *addr) | |||
851 | { | 851 | { |
852 | struct wmi_set_mac_address_cmd cmd; | 852 | struct wmi_set_mac_address_cmd cmd; |
853 | 853 | ||
854 | memcpy(cmd.mac, addr, ETH_ALEN); | 854 | ether_addr_copy(cmd.mac, addr); |
855 | 855 | ||
856 | wil_dbg_wmi(wil, "Set MAC %pM\n", addr); | 856 | wil_dbg_wmi(wil, "Set MAC %pM\n", addr); |
857 | 857 | ||
@@ -1109,6 +1109,11 @@ int wmi_rx_chain_add(struct wil6210_priv *wil, struct vring *vring) | |||
1109 | */ | 1109 | */ |
1110 | cmd.l3_l4_ctrl |= (1 << L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS); | 1110 | cmd.l3_l4_ctrl |= (1 << L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS); |
1111 | } | 1111 | } |
1112 | |||
1113 | if (rx_align_2) | ||
1114 | cmd.l2_802_3_offload_ctrl |= | ||
1115 | L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK; | ||
1116 | |||
1112 | /* typical time for secure PCP is 840ms */ | 1117 | /* typical time for secure PCP is 840ms */ |
1113 | rc = wmi_call(wil, WMI_CFG_RX_CHAIN_CMDID, &cmd, sizeof(cmd), | 1118 | rc = wmi_call(wil, WMI_CFG_RX_CHAIN_CMDID, &cmd, sizeof(cmd), |
1114 | WMI_CFG_RX_CHAIN_DONE_EVENTID, &evt, sizeof(evt), 2000); | 1119 | WMI_CFG_RX_CHAIN_DONE_EVENTID, &evt, sizeof(evt), 2000); |
@@ -1157,7 +1162,8 @@ int wmi_disconnect_sta(struct wil6210_priv *wil, const u8 *mac, u16 reason) | |||
1157 | struct wmi_disconnect_sta_cmd cmd = { | 1162 | struct wmi_disconnect_sta_cmd cmd = { |
1158 | .disconnect_reason = cpu_to_le16(reason), | 1163 | .disconnect_reason = cpu_to_le16(reason), |
1159 | }; | 1164 | }; |
1160 | memcpy(cmd.dst_mac, mac, ETH_ALEN); | 1165 | |
1166 | ether_addr_copy(cmd.dst_mac, mac); | ||
1161 | 1167 | ||
1162 | wil_dbg_wmi(wil, "%s(%pM, reason %d)\n", __func__, mac, reason); | 1168 | wil_dbg_wmi(wil, "%s(%pM, reason %d)\n", __func__, mac, reason); |
1163 | 1169 | ||