Criticising Islam is fine; making generalisations about Muslims is not. That doesn't mean you can't do it or that your freedom of speech is being abridged - just that people might voice their own criticism of your opinions if you do.
I think some people make damaging generalisations about Muslims and then hide from disapproval using the idea that they are criticising Islam. To be fair, though, there probably are also false positives - people who make valid criticisms of Islam and are ostracised for what others wrongly perceive as discrimination.