Lines Matching defs:mac
4452 static bool rtl8152_is_fw_mac_ok(struct r8152 *tp, struct fw_mac *mac)
4459 type = __le32_to_cpu(mac->blk_hdr.type);
4532 fw_offset = __le16_to_cpu(mac->fw_offset);
4533 if (fw_offset < sizeof(*mac)) {
4538 length = __le32_to_cpu(mac->blk_hdr.length);
4550 if (__le16_to_cpu(mac->fw_reg) != fw_reg) {
4555 if (__le16_to_cpu(mac->bp_ba_addr) != bp_ba_addr) {
4560 if (__le16_to_cpu(mac->bp_en_addr) != bp_en_addr) {
4565 if (__le16_to_cpu(mac->bp_start) != bp_start) {
4571 if (__le16_to_cpu(mac->bp_num) > max_bp) {
4576 for (i = __le16_to_cpu(mac->bp_num); i < max_bp; i++) {
4577 if (mac->bp[i]) {
5106 static void rtl8152_fw_mac_apply(struct r8152 *tp, struct fw_mac *mac)
5112 switch (__le32_to_cpu(mac->blk_hdr.type)) {
5123 fw_ver_reg = __le16_to_cpu(mac->fw_ver_reg);
5124 if (fw_ver_reg && ocp_read_byte(tp, MCU_TYPE_USB, fw_ver_reg) >= mac->fw_ver_data) {
5140 length = __le32_to_cpu(mac->blk_hdr.length);
5141 length -= __le16_to_cpu(mac->fw_offset);
5143 data = (u8 *)mac;
5144 data += __le16_to_cpu(mac->fw_offset);
5146 generic_ocp_write(tp, __le16_to_cpu(mac->fw_reg), 0xff, length, data,
5149 ocp_write_word(tp, type, __le16_to_cpu(mac->bp_ba_addr),
5150 __le16_to_cpu(mac->bp_ba_value));
5152 generic_ocp_write(tp, __le16_to_cpu(mac->bp_start), BYTE_EN_DWORD,
5153 __le16_to_cpu(mac->bp_num) << 1, mac->bp, type);
5155 bp_en_addr = __le16_to_cpu(mac->bp_en_addr);
5158 __le16_to_cpu(mac->bp_en_value));
5162 mac->fw_ver_data);
5164 dev_dbg(&tp->intf->dev, "successfully applied %s\n", mac->info);