I haven't been following the details too closely but from what I red it seems they agreed on meassures to limit immigrants from EU countries that I understand are EU citizens. I have read no word about so called asylum seekers.
Ultimately the reason the UK can't and won't stop the wave of migrants is their own self weakness and inability to use strict measure for fear of being labled as racist/biggot and also there are various European and International agreements that bar expolsion of asylum seekers and that won't change in the case of a brexit.
Its not the polish immigrants, its the non eu immigrants that crazy leaders in say sweeden and germany allow in from syria, africa etc. Once they get a eu passport they can travel anywhere freely.