Answer by taking a quote from the following article:

Mohammad Hafeez (Urdu: mHmd HfyZ; born 17 October 1980 in Sargodha, Punjab) is a Pakistani cricket player, who plays all forms of the game and a former T20I captain of Pakistan cricket team. Hafeez usually opens the batting and forms part of the bowling attack. In 2012-2013, he was ranked as the top all-rounder by the ICC Player Rankings in T20 format. He is known for his intelligent batting but also for aggressive shot plays when needed.

Hafeez had been reported for a suspect action after the Abu Dhabi Test against New Zealand in November 2014, and in December his action was found to be illegal following tests at an ICC accredited centre in Loughborough, England. He was found to have an elbow extension up to 31 degrees, far above the permitted limit of 15 degrees. He underwent remedial work at a biomechanics lab in Chennai, but failed an unofficial test on his action on January 3. Later that month the PCB requested the ICC to retest Hafeez's action in February in Brisbane, so that he could bowl at the World Cup if cleared, but he was ruled out of the tournament with a calf injury. Hafeez was finally cleared to bowl again in international cricket on April 21, after more tests on his action in Chennai. Mohammad Hafeez has once again been reported for a suspect action, following the conclusion of the Galle Test on 21 June 2015., and he was dropped from third test. However, he was again selected for the ODI series against Sri Lanka. He proved the value of his comeback by taking 4 for 41 runs and scored a magnificent century earned him the man of the match award.  Hafeez has been banned from bowling in international cricket for 12 months following an independent assessment of his action, which took place at the Sri Ramachandra University in Chennai on 6 July. The 34-year-old was assessed after the legality of his bowling action came under question by the match officials during Pakistan's first Test victory over Sri Lanka in Galle (17-21 June).  Following the match, Hafeez was reported by the match officials pursuant to the ICC Regulations for the Review of Bowlers Reported with Suspected Illegal Bowling Actions (the "Regulations") and subsequently underwent the independent assessment in Chennai in accordance with the regulations. The assessment revealed that Hafeez's elbow extension exceeded 15 degrees while bowling and, thus, he employed an illegal bowling action.  Hafeez was originally suspended from bowling in November 2014. Following remedial work on his bowling action, he was reassessed and permitted to resume bowling in April 2015. As this report has constituted the player's second report within a two-year period, the first of which led to a suspension, he is now automatically suspended from bowling in international cricket for a 12-month period. Hafeez is entitled to appeal any procedural aspect of an independent assessment that has led to this automatic suspension. However, only after the expiry of this one-year period will he be entitled to approach the ICC for a re-assessment of his bowling action.

How did he perform in the ODI series?
He proved the value of his comeback by taking 4 for 41 runs and scored a magnificent century earned him the man of the match award.