Lines Matching defs:mac
3605 static bool rtl8152_is_fw_mac_ok(struct r8152 *tp, struct fw_mac *mac)
3612 type = __le32_to_cpu(mac->blk_hdr.type);
3669 fw_offset = __le16_to_cpu(mac->fw_offset);
3670 if (fw_offset < sizeof(*mac)) {
3675 length = __le32_to_cpu(mac->blk_hdr.length);
3687 if (__le16_to_cpu(mac->fw_reg) != fw_reg) {
3692 if (__le16_to_cpu(mac->bp_ba_addr) != bp_ba_addr) {
3697 if (__le16_to_cpu(mac->bp_en_addr) != bp_en_addr) {
3702 if (__le16_to_cpu(mac->bp_start) != bp_start) {
3708 if (__le16_to_cpu(mac->bp_num) > max_bp) {
3713 for (i = __le16_to_cpu(mac->bp_num); i < max_bp; i++) {
3714 if (mac->bp[i]) {
3946 static void rtl8152_fw_mac_apply(struct r8152 *tp, struct fw_mac *mac)
3953 switch (__le32_to_cpu(mac->blk_hdr.type)) {
3975 length = __le32_to_cpu(mac->blk_hdr.length);
3976 length -= __le16_to_cpu(mac->fw_offset);
3978 data = (u8 *)mac;
3979 data += __le16_to_cpu(mac->fw_offset);
3981 generic_ocp_write(tp, __le16_to_cpu(mac->fw_reg), 0xff, length, data,
3984 ocp_write_word(tp, type, __le16_to_cpu(mac->bp_ba_addr),
3985 __le16_to_cpu(mac->bp_ba_value));
3987 bp_index = __le16_to_cpu(mac->bp_start);
3988 bp_num = __le16_to_cpu(mac->bp_num);
3990 ocp_write_word(tp, type, bp_index, __le16_to_cpu(mac->bp[i]));
3994 bp_en_addr = __le16_to_cpu(mac->bp_en_addr);
3997 __le16_to_cpu(mac->bp_en_value));
3999 fw_ver_reg = __le16_to_cpu(mac->fw_ver_reg);
4002 mac->fw_ver_data);
4004 dev_dbg(&tp->intf->dev, "successfully applied %s\n", mac->info);