net: reject PTP periodic output requests with unsupported flags
[linux-2.6-block.git] / drivers / net / ethernet / intel / igb / igb_ptp.c
index fd3071f55bd34c07e55c15688216e80659cdc187..4997963149f6ab062abf9d33f585d3aba376fc27 100644 (file)
@@ -551,6 +551,10 @@ static int igb_ptp_feature_enable_i210(struct ptp_clock_info *ptp,
                return 0;
 
        case PTP_CLK_REQ_PEROUT:
+               /* Reject requests with unsupported flags */
+               if (rq->perout.flags)
+                       return -EOPNOTSUPP;
+
                if (on) {
                        pin = ptp_find_pin(igb->ptp_clock, PTP_PF_PEROUT,
                                           rq->perout.index);