Plasma waves in the dayside polar cusp: 2. Magnetopause and polar magnetosheath