It's quite obvious what happened here. The Justice department discovered through wire taps that what Flynn actually discussed with Russian officials was different from what Trump officials (Pence) were telling reporters he discussed. At that point, Yates knew someone was lying and arranged for the info to be leaked to news outlets to embarrass Trump.
Flynn took the blame and resigned because someone had to, it was either him or Pence. I don't think for one minute that Trump and Pence were kept in the dark about Flynn's discussions with Russia. He was discussing sanctions with them, that's why Putin held off on expelling American diplomates from Russia. Obama didn't like Flynn discussing sanctions with Russia while he was still in office.