Lines Matching refs:frame
521 struct ieee802154_association_req_frame frame = {}; in mac802154_perform_association() local
527 frame.mhr.fc.type = IEEE802154_FC_TYPE_MAC_CMD; in mac802154_perform_association()
528 frame.mhr.fc.security_enabled = 0; in mac802154_perform_association()
529 frame.mhr.fc.frame_pending = 0; in mac802154_perform_association()
530 frame.mhr.fc.ack_request = 1; /* We always expect an ack here */ in mac802154_perform_association()
531 frame.mhr.fc.intra_pan = 0; in mac802154_perform_association()
532 frame.mhr.fc.dest_addr_mode = (coord->mode == IEEE802154_ADDR_LONG) ? in mac802154_perform_association()
534 frame.mhr.fc.version = IEEE802154_2003_STD; in mac802154_perform_association()
535 frame.mhr.fc.source_addr_mode = IEEE802154_EXTENDED_ADDRESSING; in mac802154_perform_association()
536 frame.mhr.source.mode = IEEE802154_ADDR_LONG; in mac802154_perform_association()
537 frame.mhr.source.pan_id = cpu_to_le16(IEEE802154_PANID_BROADCAST); in mac802154_perform_association()
538 frame.mhr.source.extended_addr = wpan_dev->extended_addr; in mac802154_perform_association()
539 frame.mhr.dest.mode = coord->mode; in mac802154_perform_association()
540 frame.mhr.dest.pan_id = coord->pan_id; in mac802154_perform_association()
542 frame.mhr.dest.extended_addr = coord->extended_addr; in mac802154_perform_association()
544 frame.mhr.dest.short_addr = coord->short_addr; in mac802154_perform_association()
545 frame.mhr.seq = atomic_inc_return(&wpan_dev->dsn) & 0xFF; in mac802154_perform_association()
546 frame.mac_pl.cmd_id = IEEE802154_CMD_ASSOCIATION_REQ; in mac802154_perform_association()
547 frame.assoc_req_pl.device_type = 1; in mac802154_perform_association()
548 frame.assoc_req_pl.power_source = 1; in mac802154_perform_association()
549 frame.assoc_req_pl.rx_on_when_idle = 1; in mac802154_perform_association()
550 frame.assoc_req_pl.alloc_addr = 1; in mac802154_perform_association()
552 skb = alloc_skb(IEEE802154_MAC_CMD_SKB_SZ + sizeof(frame.assoc_req_pl), in mac802154_perform_association()
559 ret = ieee802154_mac_cmd_push(skb, &frame, &frame.assoc_req_pl, in mac802154_perform_association()
560 sizeof(frame.assoc_req_pl)); in mac802154_perform_association()
647 struct ieee802154_disassociation_notif_frame frame = {}; in mac802154_send_disassociation_notif() local
654 frame.mhr.fc.type = IEEE802154_FC_TYPE_MAC_CMD; in mac802154_send_disassociation_notif()
655 frame.mhr.fc.security_enabled = 0; in mac802154_send_disassociation_notif()
656 frame.mhr.fc.frame_pending = 0; in mac802154_send_disassociation_notif()
657 frame.mhr.fc.ack_request = 1; in mac802154_send_disassociation_notif()
658 frame.mhr.fc.intra_pan = 1; in mac802154_send_disassociation_notif()
659 frame.mhr.fc.dest_addr_mode = (target->mode == IEEE802154_ADDR_LONG) ? in mac802154_send_disassociation_notif()
661 frame.mhr.fc.version = IEEE802154_2003_STD; in mac802154_send_disassociation_notif()
662 frame.mhr.fc.source_addr_mode = IEEE802154_EXTENDED_ADDRESSING; in mac802154_send_disassociation_notif()
663 frame.mhr.source.mode = IEEE802154_ADDR_LONG; in mac802154_send_disassociation_notif()
664 frame.mhr.source.pan_id = wpan_dev->pan_id; in mac802154_send_disassociation_notif()
665 frame.mhr.source.extended_addr = wpan_dev->extended_addr; in mac802154_send_disassociation_notif()
666 frame.mhr.dest.mode = target->mode; in mac802154_send_disassociation_notif()
667 frame.mhr.dest.pan_id = wpan_dev->pan_id; in mac802154_send_disassociation_notif()
669 frame.mhr.dest.extended_addr = target->extended_addr; in mac802154_send_disassociation_notif()
671 frame.mhr.dest.short_addr = target->short_addr; in mac802154_send_disassociation_notif()
672 frame.mhr.seq = atomic_inc_return(&wpan_dev->dsn) & 0xFF; in mac802154_send_disassociation_notif()
673 frame.mac_pl.cmd_id = IEEE802154_CMD_DISASSOCIATION_NOTIFY; in mac802154_send_disassociation_notif()
674 frame.disassoc_pl = reason; in mac802154_send_disassociation_notif()
676 skb = alloc_skb(IEEE802154_MAC_CMD_SKB_SZ + sizeof(frame.disassoc_pl), in mac802154_send_disassociation_notif()
683 ret = ieee802154_mac_cmd_push(skb, &frame, &frame.disassoc_pl, in mac802154_send_disassociation_notif()
684 sizeof(frame.disassoc_pl)); in mac802154_send_disassociation_notif()
709 struct ieee802154_association_resp_frame frame = {}; in mac802154_send_association_resp_locked() local
715 frame.mhr.fc.type = IEEE802154_FC_TYPE_MAC_CMD; in mac802154_send_association_resp_locked()
716 frame.mhr.fc.security_enabled = 0; in mac802154_send_association_resp_locked()
717 frame.mhr.fc.frame_pending = 0; in mac802154_send_association_resp_locked()
718 frame.mhr.fc.ack_request = 1; /* We always expect an ack here */ in mac802154_send_association_resp_locked()
719 frame.mhr.fc.intra_pan = 1; in mac802154_send_association_resp_locked()
720 frame.mhr.fc.dest_addr_mode = IEEE802154_EXTENDED_ADDRESSING; in mac802154_send_association_resp_locked()
721 frame.mhr.fc.version = IEEE802154_2003_STD; in mac802154_send_association_resp_locked()
722 frame.mhr.fc.source_addr_mode = IEEE802154_EXTENDED_ADDRESSING; in mac802154_send_association_resp_locked()
723 frame.mhr.source.mode = IEEE802154_ADDR_LONG; in mac802154_send_association_resp_locked()
724 frame.mhr.source.extended_addr = wpan_dev->extended_addr; in mac802154_send_association_resp_locked()
725 frame.mhr.dest.mode = IEEE802154_ADDR_LONG; in mac802154_send_association_resp_locked()
726 frame.mhr.dest.pan_id = wpan_dev->pan_id; in mac802154_send_association_resp_locked()
727 frame.mhr.dest.extended_addr = target->extended_addr; in mac802154_send_association_resp_locked()
728 frame.mhr.seq = atomic_inc_return(&wpan_dev->dsn) & 0xFF; in mac802154_send_association_resp_locked()
729 frame.mac_pl.cmd_id = IEEE802154_CMD_ASSOCIATION_RESP; in mac802154_send_association_resp_locked()
738 ret = ieee802154_mac_cmd_push(skb, &frame, assoc_resp_pl, in mac802154_send_association_resp_locked()