Hello shahul1433 ,
It should be hardware fault, most common issue occur from the WiFi antenna. [guide|16451|this] guide will help you to teardown you phone (see Step 18 you can find the WiFi antenna) check the coaxial cable connectivity and check whether any small crack the soldered joint or coaxial cable not connected properly.
Also [product|IF228-022-2|here] you can find the part if required to replace it
Hope this answer will help you to fix your phone your self