MAC — Medium access control — multiplexing, HARQ, the scheduler
The protocol stack
Where it sits
What it is
What it is. The sublayer that decides what actually goes out in this transmission opportunity. TS 38.321. It is the only layer that talks to the scheduler, and the only one that knows about time.
The functions, from TS 38.321 clause 4.4:
Mapping between logical channels and transport channels · multiplexing of MAC SDUs from one or different logical channels onto transport blocks · demultiplexing on reception · scheduling information reporting · error correction through HARQ · logical channel prioritisation · priority handling between overlapping resources of one UE · radio resource selection.
Three of those deserve a sentence each.
Multiplexing is where the transport block is actually assembled. Several logical channels — a signalling message and two data streams, say — are packed into one block with MAC subheaders. This is the step that makes the block opaque: below it, the pieces are indistinguishable.
HARQ lives here, not in the physical layer. TS 38.321 clause 5.3.2.1 defines the HARQ entity, one per serving cell, holding the parallel processes described in PDSCH §12.1. Layer 1 does the soft-combining; MAC decides which buffer it combines into and whether the block is new.
Logical channel prioritisation is the rule for who gets the room when the grant is smaller than the queue. It is the closest thing in the standard to a fairness policy, and it is per-device — the between-devices version is the scheduler's, and 3GPP does not specify that at all.
Random access is also MAC's (clause 5.1) — the preamble, the response, and the contention resolution that end with a device holding a C-RNTI it can be addressed by.
Read on
This concept was first written up in ref-stack, which reads the whole group as one argument.
Before this concept, the hierarchy says to learn the following — the full chain, in order: