Please follow the instructions below and apply the patches in right folders :


######### Source path for wapi patches ###########
1) 0001-WAPI-frameworks-patch-on-LA.UM.0.0.patch
Source path: frameworks/base

2) 0001-WAPI-opt-patch-on-LA.UM.0.0.patch
Source path: frameworks/opt/net/wifi

3) 0001-WAPI-packages-patch-on-LA.UM.0.0.patch
Source path: packages/apps/Settings/

4) 0001-WAPI-sepolicy-patch-on-LA.UM.0.0.patch
Source path: device/qcom/sepolicy/

5) 0001-WAPI-supplicant-patch-on-LA.UM.0.0.patch
Source path: external/wpa_supplicant_8

6) 0001-WAPI-init.qcom.rc-patch-on-LA.UM.0.0.patch
Source path: device/qcom/common 

############### Command to apply these patches ###############
cd <source_path>
git am <path_to_patch> 
e.g.
cd frameworks/base
git am 0001-WAPI-frameworks-patch-on-LA.UM.5.1.patch

or you can use patch -p1 < 0001-WAPI-frameworks-patch-on-LA.UM.5.1.patch

