Subclavian nerve

The subclavian nerve, also known as the nerve to the subclavius, is a small branch of the upper trunk of the brachial plexus. It contains axons from C5 and C6. It innervates the subclavius muscle.

Origin
The subclavian nerve is a branch of the upper trunk of the brachial plexus. It contains axons derived from the ventral rami of the C5 and C6 cervical spinal nerves.

The origin is situated within the posterior triangle of the neck. 

Course
Descending, it passes anterior to (the 3rd part of) the subclavian artery and vein. 

Accessory phrenic nerve
The subclavian nerve may issue a branch called the accessory phrenic nerve  which innervates the diaphragm. The accessory phrenic nerve may rather branch from the C4 or C6 segments or ansa cervicalis. This nerve usually joins with the phrenic nerve before innervating the diaphragm, ventral to the subclavian vein.

Function
The subclavian nerve innervates the subclavius muscle.